Package org.eclipse.jdt.internal.compiler.ast

Examples of org.eclipse.jdt.internal.compiler.ast.AnnotationMethodDeclaration


    this.lastIgnoredToken = -1;
  }
}
protected void consumeAnnotationTypeMemberDeclaration() {
  // AnnotationTypeMemberDeclaration ::= AnnotationTypeMemberDeclarationHeader AnnotationTypeMemberHeaderExtendedDims DefaultValueopt ';'
  AnnotationMethodDeclaration annotationTypeMemberDeclaration = (AnnotationMethodDeclaration) this.astStack[this.astPtr];
  annotationTypeMemberDeclaration.modifiers |= ExtraCompilerModifiers.AccSemicolonBody;
  // store the this.endPosition (position just before the '}') in case there is
  // a trailing comment behind the end of the method
  int declarationEndPosition = flushCommentsDefinedPriorTo(this.endStatementPosition);
  annotationTypeMemberDeclaration.bodyStart = this.endStatementPosition;
View Full Code Here


  // MethodHeaderName ::= Modifiersopt Type 'Identifier' '('
  // AnnotationMethodHeaderName ::= Modifiersopt Type 'Identifier' '('
  // RecoveryMethodHeaderName ::= Modifiersopt Type 'Identifier' '('
  MethodDeclaration md = null;
  if(isAnnotationMethod) {
    md = new AnnotationMethodDeclaration(this.compilationUnit.compilationResult);
    this.recordStringLiterals = false;
  } else {
    md = new MethodDeclaration(this.compilationUnit.compilationResult);
  }
View Full Code Here

  // MethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('
  // AnnotationMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('
  // RecoveryMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('
  MethodDeclaration md = null;
  if(isAnnotationMethod) {
    md = new AnnotationMethodDeclaration(this.compilationUnit.compilationResult);
    this.recordStringLiterals = false;
  } else {
    md = new MethodDeclaration(this.compilationUnit.compilationResult);
  }
View Full Code Here

    org.eclipse.jdt.internal.compiler.ast.ASTNode node = bindingsToNodes == null ? null : bindingsToNodes.get(methodBinding);
    if (node != null && !declaringType.isBinary()) {
      if (node instanceof AnnotationMethodDeclaration) {
        // node is an AnnotationMethodDeclaration
        AnnotationMethodDeclaration typeMemberDeclaration = (AnnotationMethodDeclaration) node;
        return (JavaElement) declaringType.getMethod(String.valueOf(typeMemberDeclaration.selector), CharOperation.NO_STRINGS); // annotation type members don't have parameters
      } else {
        // node is an MethodDeclaration
        MethodDeclaration methodDeclaration = (MethodDeclaration) node;
View Full Code Here

          jmethod.typeParameters())) {
        return false;
      }
    } else {
      if (jmethod.isAnnotationMethod()) {
        AnnotationMethodDeclaration annotationMethod = (AnnotationMethodDeclaration) jmethod;
        Object defaultValue = null;
        if (annotationMethod.defaultValue != null) {
          defaultValue = getAnnotationElementValue(logger,
              annotationMethod.returnType.resolvedType,
              annotationMethod.defaultValue);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.ast.AnnotationMethodDeclaration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.