org.python.indexer
Class Def
- java.lang.Object
-
- org.python.indexer.Def
-
public class Def extends java.lang.ObjectEncapsulates information about a binding definition site.
-
-
Constructor Summary
Constructors Constructor and Description Def(NNode node)Def(NNode node, NBinding b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intend()booleanequals(java.lang.Object obj)NBindinggetBinding()java.lang.StringgetFile()Returns the file if this node is from a source file, elsenull.java.lang.StringgetFileOrUrl()Returns the file if from a source file, else the URL.java.lang.StringgetName()Returns the name of the node.java.lang.StringgetURL()Returns the URL if this node is from a URL, elsenull.inthashCode()booleanisModule()booleanisName()booleanisURL()Returnstrueif this node is from a URL.intlength()intstart()java.lang.StringtoString()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the node. Only applies if the definition coincides with aNNamenode.- Returns:
- the name, or null
-
getFile
public java.lang.String getFile()
Returns the file if this node is from a source file, elsenull.
-
getURL
public java.lang.String getURL()
Returns the URL if this node is from a URL, elsenull.
-
getFileOrUrl
public java.lang.String getFileOrUrl()
Returns the file if from a source file, else the URL.
-
isURL
public boolean isURL()
Returnstrueif this node is from a URL.
-
isModule
public boolean isModule()
-
start
public int start()
-
end
public int end()
-
length
public int length()
-
isName
public boolean isName()
-
getBinding
public NBinding getBinding()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG