org.aspectj.weaver.patterns
Class BasicToken

java.lang.Object
  extended by org.aspectj.weaver.patterns.BasicToken
All Implemented Interfaces:
IHasPosition, IToken

public final class BasicToken
extends java.lang.Object
implements IToken


Field Summary
 
Fields inherited from interface org.aspectj.weaver.patterns.IToken
EOF
 
Method Summary
 int getEnd()
          The ending index of this location in the character stream This points to the last character in this token.
 java.lang.String getFileName()
           
 java.lang.String getLiteralKind()
          Whether this should be treated as a literal value Kinds == "string", ??? returns null if this isn't a literal
 int getStart()
          The starting index of this location in the character stream.
 java.lang.String getString()
          Returns the string value of this token.
 boolean isIdentifier()
          Whether this should be treated as a token or a generic identifier
static BasicToken makeIdentifier(java.lang.String value, int start, int end)
           
static BasicToken makeLiteral(java.lang.String value, java.lang.String kind, int start, int end)
           
static BasicToken makeOperator(java.lang.String value, int start, int end)
           
 Pointcut maybeGetParsedPointcut()
          If this token represents a pre-parsed Pointcut, then return it; otherwise returns null.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

makeOperator

public static BasicToken makeOperator(java.lang.String value,
                                      int start,
                                      int end)

makeIdentifier

public static BasicToken makeIdentifier(java.lang.String value,
                                        int start,
                                        int end)

makeLiteral

public static BasicToken makeLiteral(java.lang.String value,
                                     java.lang.String kind,
                                     int start,
                                     int end)

getStart

public int getStart()
Description copied from interface: IHasPosition
The starting index of this location in the character stream.

Specified by:
getStart in interface IHasPosition

getEnd

public int getEnd()
Description copied from interface: IHasPosition
The ending index of this location in the character stream This points to the last character in this token. If a location truly had no contents, then start == end + 1. We don't recommend this.

Specified by:
getEnd in interface IHasPosition

getFileName

public java.lang.String getFileName()

getString

public java.lang.String getString()
Description copied from interface: IToken
Returns the string value of this token. If isIdentifier is false, then this string must be intern'd so that == matching can be used. If isIdentifier is true, interning is not required.

Specified by:
getString in interface IToken

isIdentifier

public boolean isIdentifier()
Description copied from interface: IToken
Whether this should be treated as a token or a generic identifier

Specified by:
isIdentifier in interface IToken

maybeGetParsedPointcut

public Pointcut maybeGetParsedPointcut()
Description copied from interface: IToken
If this token represents a pre-parsed Pointcut, then return it; otherwise returns null. Needed for the implementation of 'if'

Specified by:
maybeGetParsedPointcut in interface IToken

toString

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

getLiteralKind

public java.lang.String getLiteralKind()
Description copied from interface: IToken
Whether this should be treated as a literal value Kinds == "string", ??? returns null if this isn't a literal

Specified by:
getLiteralKind in interface IToken