Examples of AnnotationMethodDeclaration


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

          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

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

      ConstructorDeclaration decl = new ConstructorDeclaration(this.compilationResult);
      decl.bits &= ~ASTNode.IsDefaultConstructor;
      decl.typeParameters = typeParams;
      methodDeclaration = decl;
    } else {
      MethodDeclaration decl = type.isAnnotation() ? new AnnotationMethodDeclaration(this.compilationResult) : new MethodDeclaration(this.compilationResult);
      /* convert return type */
      TypeReference typeReference = createTypeReference(method.getReturnType());
      if (typeReference == null) return null;
      decl.returnType = typeReference;
      decl.typeParameters = typeParams;
View Full Code Here

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

  this.visitIfNeeded(methodDeclaration);

  if (isInRange) {
    if (methodDeclaration instanceof AnnotationMethodDeclaration) {
      AnnotationMethodDeclaration annotationMethodDeclaration = (AnnotationMethodDeclaration) methodDeclaration;
      Expression expression = annotationMethodDeclaration.defaultValue;
      if (expression != null) {
        this.requestor.exitMethod(methodDeclaration.declarationSourceEnd, expression);
        return;
      }
View Full Code Here

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

  this.visitIfNeeded(methodDeclaration);

  if (isInRange) {
    if (methodDeclaration instanceof AnnotationMethodDeclaration) {
      AnnotationMethodDeclaration annotationMethodDeclaration = (AnnotationMethodDeclaration) methodDeclaration;
      Expression expression = annotationMethodDeclaration.defaultValue;
      if (expression != null) {
        this.requestor.exitMethod(methodDeclaration.declarationSourceEnd, expression);
        return;
      }
View Full Code Here

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

    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

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

  this.visitIfNeeded(methodDeclaration);

  if (isInRange) {
    if (methodDeclaration instanceof AnnotationMethodDeclaration) {
      AnnotationMethodDeclaration annotationMethodDeclaration = (AnnotationMethodDeclaration) methodDeclaration;
      Expression expression = annotationMethodDeclaration.defaultValue;
      if (expression != null) {
        this.requestor.exitMethod(methodDeclaration.declarationSourceEnd, expression);
        return;
      }
View Full Code Here

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

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

  // 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

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

  // 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

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

    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
TOP
Copyright © 2018 www.massapi.com. 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.