Class Scope.Var

    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of the variable.
        Specified by:
        getName in interface StaticSlot<JSType>
      • getParentNode

        public Node getParentNode()
        Gets the parent of the name node.
      • isBleedingFunction

        public boolean isBleedingFunction()
        Whether this is a bleeding function (an anonymous named function that bleeds into the inner scope).
      • isGlobal

        public boolean isGlobal()
        Returns whether this is a global variable.
      • isLocal

        public boolean isLocal()
        Returns whether this is a local variable.
      • isConst

        public boolean isConst()
        Returns true if the variable is declared as a constant, based on the value reported by NodeUtil.
      • isDefine

        public boolean isDefine()
        Returns true if the variable is declared as a define. A variable is a define if it is annotated by @define.
      • getInitialValue

        public Node getInitialValue()
      • getType

        public JSType getType()
        Gets this variable's type. To know whether this type has been inferred, see #isTypeInferred().
        Specified by:
        getType in interface StaticSlot<JSType>
        Returns:
        The type or null if no type is declared for it.
      • getNameNode

        public Node getNameNode()
        Returns the name node that produced this variable.
      • isTypeInferred

        public boolean isTypeInferred()
        Returns whether this variable's type is inferred. To get the variable's type, see getType().
        Specified by:
        isTypeInferred in interface StaticSlot<JSType>
      • getInputName

        public java.lang.String getInputName()
      • isNoShadow

        public boolean isNoShadow()
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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