Example usage for org.eclipse.jdt.internal.compiler.parser RecoveredAnnotation setKind

List of usage examples for org.eclipse.jdt.internal.compiler.parser RecoveredAnnotation setKind

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.parser RecoveredAnnotation setKind.

Prototype

public void setKind(int kind) 

Source Link

Usage

From source file:org.eclipse.jdt.internal.compiler.parser.Parser.java

License:Open Source License

protected void consumeMemberValuePair() {
    // MemberValuePair ::= SimpleName '=' MemberValue
    char[] simpleName = this.identifierStack[this.identifierPtr];
    long position = this.identifierPositionStack[this.identifierPtr--];
    this.identifierLengthPtr--;
    int end = (int) position;
    int start = (int) (position >>> 32);
    Expression value = this.expressionStack[this.expressionPtr--];
    this.expressionLengthPtr--;
    MemberValuePair memberValuePair = new MemberValuePair(simpleName, start, end, value);
    pushOnAstStack(memberValuePair);// ww  w .j a  v  a 2  s . co  m

    if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
        RecoveredAnnotation recoveredAnnotation = (RecoveredAnnotation) this.currentElement;

        recoveredAnnotation.setKind(RecoveredAnnotation.NORMAL);
    }
}

From source file:org.eclipse.jdt.internal.compiler.parser.Parser.java

License:Open Source License

protected void consumeSingleMemberAnnotationMemberValue() {
    // this rule is used for syntax recovery only
    if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
        RecoveredAnnotation recoveredAnnotation = (RecoveredAnnotation) this.currentElement;

        recoveredAnnotation.setKind(RecoveredAnnotation.SINGLE_MEMBER);
    }/*from   ww  w.  ja v a2  s .  c  o m*/

}