Documentation of 'org.python.indexer.ast.NAlias' Java class
NAlias
org.python.indexer.ast

Class NAlias

  • All Implemented Interfaces:
    java.io.Serializable


    public class NAlias
    extends NNode
    A name alias. Used for the components of import and import-from statements.
    See Also:
    Serialized Form
    • Field Detail

      • qname

        public NQname qname
        Represents one of three possibilities:
        1. import stmt: qname of one of the imported modules
        2. import-from stmt: qname of the referenced module
        3. import-from stmt: simple name imported from referenced module
      • name

        public java.lang.String name
        The un-parsed qname or simple name corresponding to qname.
      • aname

        public NName aname
        The alias name, if an "as" clause was specified.
    • Constructor Detail

      • NAlias

        public NAlias(java.lang.String name,
                      NQname qname,
                      NName aname)
      • NAlias

        public NAlias(java.lang.String name,
                      NQname qname,
                      NName aname,
                      int start,
                      int end)
    • Method Detail

      • getBoundName

        public java.lang.String getBoundName()
        Returns the alias, if non-null, else the simple name.
      • resolve

        public NType resolve(Scope s)
                      throws java.lang.Exception
        Resolves and returns the referenced NModuleType in an import or or import-from statement. NImportFrom statements manually resolve their child NAliases.
        Overrides:
        resolve in class NNode
        Throws:
        java.lang.Exception
      • toString

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

        public void visit(NNodeVisitor v)
        Description copied from class: NNode
        Visits this node and optionally its children.

        Specified by:
        visit in class NNode
        Parameters:
        v - the object to call with this node. If the visitor returns true, the node also passes its children to the visitor.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.