Class IdentifierToken


  • public class IdentifierToken
    extends java.lang.Object
    Information about the occurrence of an identifier. The parser produces these to represent name which cannot yet be bound to field definitions. WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
    • Field Detail

      • where

        long where
      • modifiers

        int modifiers
    • Constructor Detail

      • IdentifierToken

        public IdentifierToken​(long where,
                               Identifier id)
      • IdentifierToken

        public IdentifierToken​(Identifier id)
        Use this constructor when the identifier is synthesized. The location will be 0.
      • IdentifierToken

        public IdentifierToken​(long where,
                               Identifier id,
                               int modifiers)
    • Method Detail

      • getWhere

        public long getWhere()
        The source location of this identifier occurrence.
      • getName

        public Identifier getName()
        The identifier itself (possibly qualified).
      • getModifiers

        public int getModifiers()
        The modifiers associated with the occurrence, if any.
      • toString

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

        public static long getWhere​(IdentifierToken id,
                                    long defaultWhere)
        Return defaultWhere if id is null or id.where is missing (0). Otherwise, return id.where.