Documentation of 'org.python.indexer.NBinding' Java class
NBinding
org.python.indexer

Class NBinding

  • All Implemented Interfaces:
    java.lang.Comparable<java.lang.Object>


    public class NBinding
    extends java.lang.Object
    implements java.lang.Comparable<java.lang.Object>
    An NBinding collects information about a fully qualified name (qname) in the code graph.

    Each qname has an associated NType. When a particular qname is assigned values of different types at different locations, its type is represented as a NUnionType.

    Each qname has a set of one or more definitions, and a set of zero or more references. Definitions and references correspond to code locations.

    • Method Detail

      • setName

        public void setName(java.lang.String name)
        Sets the binding's simple (unqualified) name.
      • getName

        public java.lang.String getName()
        Returns the unqualified name.
      • setQname

        public void setQname(java.lang.String qname)
        Sets the binding's qualified name. This should in general be the same as binding.getType().getTable().getPath().
      • getQname

        public java.lang.String getQname()
        Returns the qualified name.
      • addDef

        public void addDef(NNode node)
        Adds node as a definition for this binding. This is called automatically (when appropriate) by adding the binding to a Scope.
      • addDefs

        public void addDefs(java.util.Collection<NNode> nodes)
      • addDef

        public void addDef(Def def)
        Adds def as a definition for this binding. This is called automatically (when appropriate) by adding the binding to a Scope. If node is an NUrl, and this is the binding's only definition, it will be marked as a builtin.
      • addRef

        public void addRef(NNode node)
      • addRef

        public void addRef(Ref ref)
      • removeRef

        public void removeRef(Ref node)
      • getSignatureNode

        public Def getSignatureNode()
        Returns the first definition, which by convention is treated as the one that introduced the binding.
      • setType

        public void setType(NType type)
      • getType

        public NType getType()
      • markStatic

        public void markStatic()
      • isStatic

        public boolean isStatic()
      • markSynthetic

        public void markSynthetic()
      • isSynthetic

        public boolean isSynthetic()
      • markReadOnly

        public void markReadOnly()
      • isReadOnly

        public boolean isReadOnly()
      • isDeprecated

        public boolean isDeprecated()
      • markDeprecated

        public void markDeprecated()
      • isBuiltin

        public boolean isBuiltin()
      • markBuiltin

        public void markBuiltin()
      • setProvisional

        public void setProvisional(boolean isProvisional)
      • isProvisional

        public boolean isProvisional()
      • compareTo

        public int compareTo(java.lang.Object o)
        Bindings can be sorted by their location for outlining purposes.
        Specified by:
        compareTo in interface java.lang.Comparable<java.lang.Object>
      • getDefs

        public java.util.List<Def> getDefs()
        Return the (possibly empty) set of definitions for this binding.
        Returns:
        the defs
      • getNumDefs

        public int getNumDefs()
        Returns the number of definitions found for this binding.
      • hasRefs

        public boolean hasRefs()
      • getNumRefs

        public int getNumRefs()
      • getRefs

        public java.util.Set<Ref> getRefs()
        Returns the set of references to this binding.
      • getFirstFile

        public java.lang.String getFirstFile()
        Returns a filename associated with this binding, for debug messages.
        Returns:
        the filename associated with the type (if present) or the first definition (if present), otherwise a string describing what is known about the binding's source.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.