Package org.aspectj.org.eclipse.jdt.internal.compiler.impl

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.ReferenceContext


    // If the unused argument is in a pointcut, don't report the problem (for now... pr148219)
    if (localDecl instanceof Argument) {
      Argument arg = (Argument) localDecl;
      if (arg.binding != null && arg.binding.declaringScope != null) {
        ReferenceContext context = arg.binding.declaringScope.referenceContext();
        if (context != null && context instanceof PointcutDeclaration)
          return;
      }
    }
    if (new String(localDecl.name).startsWith("ajc$")) {
View Full Code Here


  private AdviceDeclaration findEnclosingAround(Scope scope) {
    if (scope == null) return null;
       
    if (scope instanceof MethodScope) {
      MethodScope methodScope = (MethodScope)scope;
      ReferenceContext context = methodScope.referenceContext;
      if (context instanceof AdviceDeclaration) {
        AdviceDeclaration adviceDecl = (AdviceDeclaration)context;
        if (adviceDecl.kind == AdviceKind.Around) {
          // pr 53981 only match "bare" calls to proceed
          if((receiver != null) && (!receiver.isThis())) { return null; }
View Full Code Here

  */
  public final boolean isDefinedInMethod(MethodBinding method) {
    Scope scope = this;
    do {
      if (scope instanceof MethodScope) {
        ReferenceContext refContext = ((MethodScope) scope).referenceContext;
        if (refContext instanceof AbstractMethodDeclaration)
          if (((AbstractMethodDeclaration) refContext).binding == method)
            return true;
      }
      scope = scope.parent;
View Full Code Here

    // declaring method or type
    BlockScope scope = this.declaringScope;
    if (scope != null) {
      // the scope can be null. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=185129
      MethodScope methodScope = scope instanceof MethodScope ? (MethodScope) scope : scope.enclosingMethodScope();
      ReferenceContext referenceContext = methodScope.referenceContext;
      if (referenceContext instanceof AbstractMethodDeclaration) {
        MethodBinding methodBinding = ((AbstractMethodDeclaration) referenceContext).binding;
        if (methodBinding != null) {
          buffer.append(methodBinding.computeUniqueKey(false/*not a leaf*/));
        }
 
View Full Code Here

      if (sLoc != null) {
        filename = sLoc.getSourceFile().getPath().toCharArray();
        usedBinarySourceFileName = true;
      }
    }
    ReferenceContext referenceContext = findReferenceContextFor(problemSource);
    IProblem problem = compiler.problemReporter.createProblem(
                filename,
                IProblem.Unclassified,
                new String[0],
                new String[] {message.getMessage()},
View Full Code Here

    }
    return pos;
  }

  private ReferenceContext findReferenceContextFor(CompilationResult result) {
    ReferenceContext context = null;
    if (compiler.unitsToProcess == null) return null;
    for (int i = 0; i < compiler.unitsToProcess.length; i++) {
      if ((compiler.unitsToProcess[i] != null) &&
          (compiler.unitsToProcess[i].compilationResult == result)) {
        context = compiler.unitsToProcess[i];
View Full Code Here

  private AdviceDeclaration findEnclosingAround(Scope scope) {
    if (scope == null) return null;
       
    if (scope instanceof MethodScope) {
      MethodScope methodScope = (MethodScope)scope;
      ReferenceContext context = methodScope.referenceContext;
      if (context instanceof AdviceDeclaration) {
        AdviceDeclaration adviceDecl = (AdviceDeclaration)context;
        if (adviceDecl.kind == AdviceKind.Around) {
          // pr 53981 only match "bare" calls to proceed
          if((receiver != null) && (!receiver.isThis())) { return null; }
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.impl.ReferenceContext

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.