Examples of declarationOf()


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.declarationOf()

          abits = toAdd[0].resolvedType.getAnnotationTagBits();
        }
      } else {
        abits = mbs[0].getAnnotationTagBits(); // ensure resolved
        TypeDeclaration typeDecl = ((SourceTypeBinding) declaringBinding).scope.referenceContext;
        methodDecl = typeDecl.declarationOf(mbs[0]);
        toAdd = methodDecl.annotations; // this is what to add
        toAdd[0] = createAnnotationCopy(toAdd[0]);
        if (toAdd[0].resolvedType != null) {
          abits = toAdd[0].resolvedType.getAnnotationTagBits();
          // }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.declarationOf()

    }
    if (realBinding instanceof FieldBinding) {
      argumentNames = NO_ARGS;
    } else {
      TypeDeclaration typeDecl = getTypeDeclaration();
      AbstractMethodDeclaration methodDecl = (typeDecl == null ? null : typeDecl.declarationOf((MethodBinding) realBinding));
      Argument[] args = (methodDecl == null ? null : methodDecl.arguments); // dont
      // like
      // this
      // -
      // why
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.declarationOf()

    // 1. code is broken
    // 2. this resolvedmember is an EclipseResolvedMember created up front to represent a privileged'd accessed member
    if (tDecl != null) {
      if (realBinding instanceof MethodBinding) {
        MethodBinding methodBinding = (MethodBinding) realBinding;
        AbstractMethodDeclaration methodDecl = tDecl.declarationOf(methodBinding);
        if (methodDecl == null) {
          // pr284862
          // bindings may have been trashed by InterTypeMemberFinder.addInterTypeMethod() - and so we need to take
          // a better look. Really this EclipseResolvedMember is broken...
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.declarationOf()

          }
          return null; // give up! kind of assuming here that the code has other problems (and they will be reported)
        }
        return methodDecl.annotations;
      } else if (realBinding instanceof FieldBinding) {
        FieldDeclaration fieldDecl = tDecl.declarationOf((FieldBinding) realBinding);
        return fieldDecl.annotations;
      }
    }
    return null;
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.declarationOf()

      FieldBinding originalField = this.original();
      if (originalField.declaringClass instanceof SourceTypeBinding) {
        SourceTypeBinding sourceType = (SourceTypeBinding) originalField.declaringClass;
        if (sourceType.scope != null) {
          TypeDeclaration typeDecl = sourceType.scope.referenceContext;
          FieldDeclaration fieldDecl = typeDecl.declarationOf(originalField);
          fieldDecl.resolve(originalField.isStatic() //side effect on binding
              ? typeDecl.staticInitializerScope
              : typeDecl.initializerScope);
          fieldConstant = originalField.constant();
        } else {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.declarationOf()

    if (scope == null) { // synthetic fields do not have a scope nor any annotations
      this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
      return 0;
    }
    TypeDeclaration typeDecl = scope.referenceContext;
    FieldDeclaration fieldDecl = typeDecl.declarationOf(originalField);
    if (fieldDecl != null) {
      MethodScope initializationScope = isStatic() ? typeDecl.staticInitializerScope : typeDecl.initializerScope;
      FieldBinding previousField = initializationScope.initializedField;
      int previousFieldID = initializationScope.lastVisibleFieldID;     
      try {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.declarationOf()

  MethodBinding originalMethod = this.original();
  if ((originalMethod.tagBits & TagBits.AnnotationResolved) == 0 && originalMethod.declaringClass instanceof SourceTypeBinding) {
    ClassScope scope = ((SourceTypeBinding) originalMethod.declaringClass).scope;
    if (scope != null) {
      TypeDeclaration typeDecl = scope.referenceContext;
      AbstractMethodDeclaration methodDecl = typeDecl.declarationOf(originalMethod);
      if (methodDecl != null)
        ASTNode.resolveAnnotations(methodDecl.scope, methodDecl.annotations, originalMethod);
    }
  }
  return originalMethod.tagBits;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.declarationOf()

    // required yet ...
    SourceTypeBinding stb = (SourceTypeBinding)tb;
    MethodBinding[]  mbs = stb.getMethods(decA.getAnnotationMethod().toCharArray());
    long abits = mbs[0].getAnnotationTagBits(); // ensure resolved
    TypeDeclaration typeDecl = ((SourceTypeBinding)mbs[0].declaringClass).scope.referenceContext;
    AbstractMethodDeclaration methodDecl = typeDecl.declarationOf(mbs[0]);
    Annotation[] toAdd = methodDecl.annotations; // this is what to add
    abits = toAdd[0].resolvedType.getAnnotationTagBits();
   
    if (sourceType instanceof BinaryTypeBinding) {
      // In this case we can't access the source type binding to add a new annotation, so let's put something
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.declarationOf()

      FieldBinding originalField = original();
      if (originalField.declaringClass instanceof SourceTypeBinding) {
        SourceTypeBinding sourceType = (SourceTypeBinding) originalField.declaringClass;
        if (sourceType.scope != null) {
          TypeDeclaration typeDecl = sourceType.scope.referenceContext;
          FieldDeclaration fieldDecl = typeDecl.declarationOf(originalField);
          MethodScope initScope = originalField.isStatic() ? typeDecl.staticInitializerScope : typeDecl.initializerScope;
          boolean old = initScope.insideTypeAnnotation;
          try {
            initScope.insideTypeAnnotation = false;
            fieldDecl.resolve(initScope); //side effect on binding
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.declarationOf()

    if (scope == null) { // synthetic fields do not have a scope nor any annotations
      this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
      return 0;
    }
    TypeDeclaration typeDecl = scope.referenceContext;
    FieldDeclaration fieldDecl = typeDecl.declarationOf(originalField);
    if (fieldDecl != null) {
      MethodScope initializationScope = isStatic() ? typeDecl.staticInitializerScope : typeDecl.initializerScope;
      FieldBinding previousField = initializationScope.initializedField;
      int previousFieldID = initializationScope.lastVisibleFieldID;
      try {
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.