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

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope


    if (realBinding instanceof MethodBinding) {
      MethodBinding mb = (MethodBinding) realBinding;
      if (mb != null) {
        SourceTypeBinding stb = (SourceTypeBinding) mb.declaringClass;
        if (stb != null) {
          ClassScope cScope = stb.scope;
          if (cScope != null) {
            return cScope.referenceContext;
          }
        }
      }
    } else if (realBinding instanceof FieldBinding) {
      FieldBinding fb = (FieldBinding) realBinding;
      if (fb != null) {
        SourceTypeBinding stb = (SourceTypeBinding) fb.declaringClass;
        if (stb != null) {
          ClassScope cScope = stb.scope;
          if (cScope != null) {
            return cScope.referenceContext;
          }
        }
      }
View Full Code Here


   */
  public void ensureScopeSetup() {
    if (scopeSetup) {
      return; // don't do it again
    }
    ClassScope scope = this.scope;

    // TODO [inner] ton of stuff related to parameterization support

    // if (ot instanceof ParameterizedQualifiedTypeReference) { // pr132349
    // ParameterizedQualifiedTypeReference pref = (ParameterizedQualifiedTypeReference) ot;
View Full Code Here

  // override
  public void resolveStatements() {
    if (binding == null || ignoreFurtherInvestigation)
      return;

    ClassScope upperScope = (ClassScope) scope.parent; // !!! safety

    modifiers = checkAndSetModifiers(modifiers, upperScope);
    int bindingModifiers = (modifiers | (binding.modifiers & ExtraCompilerModifiers.AccGenericSignature));
    binding.modifiers = bindingModifiers;

    if (kind == AdviceKind.AfterThrowing && extraArgument != null) {
      TypeBinding argTb = extraArgument.binding.type;
      TypeBinding expectedTb = upperScope.getJavaLangThrowable();
      if (!argTb.isCompatibleWith(expectedTb)) {
        scope.problemReporter().typeMismatchError(argTb, expectedTb, extraArgument);
        ignoreFurtherInvestigation = true;
        return;
      }
    }

    pointcutDesignator.finishResolveTypes(this, this.binding, baseArgumentCount, upperScope.referenceContext.binding);

    if (binding == null || ignoreFurtherInvestigation)
      return;

    if (kind == AdviceKind.Around) {
      ReferenceBinding[] exceptions = new ReferenceBinding[] { upperScope.getJavaLangThrowable() };
      proceedMethodBinding = new MethodBinding(Modifier.STATIC | Flags.AccSynthetic, "proceed".toCharArray(),
          binding.returnType, resize(baseArgumentCount + 1, binding.parameters), exceptions, binding.declaringClass);
      proceedMethodBinding.selector = CharOperation.concat(selector, proceedMethodBinding.selector);
    }
View Full Code Here

  // override
  public void resolveStatements() {
    if (binding == null || ignoreFurtherInvestigation) return;
   
    ClassScope upperScope = (ClassScope)scope.parent;  //!!! safety
   
    modifiers = checkAndSetModifiers(modifiers, upperScope);
    int bindingModifiers = (modifiers | (binding.modifiers & AccGenericSignature));
    binding.modifiers = bindingModifiers;
   
    if (kind == AdviceKind.AfterThrowing && extraArgument != null) {
      TypeBinding argTb = extraArgument.binding.type;
      TypeBinding expectedTb = upperScope.getJavaLangThrowable();
      if (!argTb.isCompatibleWith(expectedTb)) {
        scope.problemReporter().typeMismatchError(argTb, expectedTb, extraArgument);
        ignoreFurtherInvestigation = true;
        return;
      }
    }
   
   
    pointcutDesignator.finishResolveTypes(this, this.binding,
      baseArgumentCount, upperScope.referenceContext.binding);
   
    if (binding == null || ignoreFurtherInvestigation) return;
   
    if (kind == AdviceKind.Around) {
      ReferenceBinding[] exceptions =
        new ReferenceBinding[] { upperScope.getJavaLangThrowable() };
      proceedMethodBinding = new MethodBinding(Modifier.STATIC,
        "proceed".toCharArray(), binding.returnType,
        resize(baseArgumentCount+1, binding.parameters),
        exceptions, binding.declaringClass);
      proceedMethodBinding.selector =
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope

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.