Package org.aspectj.weaver

Examples of org.aspectj.weaver.ResolvedMemberImpl


  public boolean isXSerializableAspects() {
    return xSerializableAspects;
  }

  public ResolvedMember fromBinding(MethodBinding binding) {
    return new ResolvedMemberImpl(Member.METHOD, fromBinding(binding.declaringClass), binding.modifiers,
        fromBinding(binding.returnType), CharOperation.charToString(binding.selector), fromBindings(binding.parameters));
  }
View Full Code Here


    // }
    return ret;
  }

  public void notePrivilegedTypeAccess(ReferenceBinding type, ASTNode location) {
    ResolvedMember key = new ResolvedMemberImpl(Member.STATIC_INITIALIZATION, inAspect.factory.fromEclipse(type), 0,
        ResolvedType.VOID, "", UnresolvedType.NONE);

    checkWeaveAccess(key.getDeclaringType(), location);
    accessors.put(key, key);
  }
View Full Code Here

    // Build a half correct resolvedmember (makeResolvedMember understands tvars) then build a fully correct sig from it
    ResolvedMember sigtemp = world.makeResolvedMemberForITD(binding, onTypeBinding, interTypeScope.getRecoveryAliases());
    UnresolvedType returnType = sigtemp.getReturnType();
    // if (returnType.isParameterizedType() || returnType.isGenericType()) returnType = returnType.getRawType();
    ResolvedMember sig = new ResolvedMemberImpl(Member.FIELD, declaringType, declaredModifiers, returnType, new String(
        declaredSelector), UnresolvedType.NONE);
    sig.setTypeVariables(sigtemp.getTypeVariables());

    NewFieldTypeMunger myMunger = new NewFieldTypeMunger(sig, null, typeVariableAliases);
    setMunger(myMunger);
    ResolvedType aspectType = world.fromEclipse(classScope.referenceContext.binding);
    ResolvedMember me = myMunger.getInitMethod(aspectType);
View Full Code Here

    if (expr instanceof FalseLiteral) {
      return IfPointcut.makeIfFalsePointcut(Pointcut.SYMBOLIC);
    } else if (expr instanceof TrueLiteral) {
      return IfPointcut.makeIfTruePointcut(Pointcut.SYMBOLIC);
    } else {
      pointcut = new IfPointcut(new ResolvedMemberImpl(Member.METHOD, UnresolvedType.OBJECT, 0, "if_", "()V"), 0);
    }
    return pointcut;

  }
View Full Code Here

      return null; // We encountered a problem building the scope, don't continue - error already reported

    // This signature represents what we want consumers of the targetted type to 'see'
    // must use the factory method to build it since there may be typevariables from the binding
    // referred to in the parameters/returntype
    ResolvedMemberImpl sig = factory.makeResolvedMemberForITD(binding, onTypeBinding, interTypeScope.getRecoveryAliases());
    sig.resetName(new String(declaredSelector));
    int resetModifiers = declaredModifiers;
    if (binding.isVarargs())
      resetModifiers = resetModifiers | Constants.ACC_VARARGS;
    sig.resetModifiers(resetModifiers);
    NewMethodTypeMunger myMunger = new NewMethodTypeMunger(sig, null, typeVariableAliases);
    setMunger(myMunger);
    ResolvedType aspectType = factory.fromEclipse(classScope.referenceContext.binding);
    ResolvedMember me = myMunger.getInterMethodBody(aspectType);
    this.selector = binding.selector = me.getName().toCharArray();
View Full Code Here

    pre.scope = new MethodScope(scope, pre, true);
    // ??? do we need to do anything with scope???

    // Use the factory to build a semi-correct resolvedmember - then patch it up with
    // reset calls. This is SAFE
    ResolvedMemberImpl preIntroducedConstructorRM = world.makeResolvedMember(binding);
    preIntroducedConstructorRM.resetName(NameMangler.preIntroducedConstructor(aspectTypeX, targetTypeX));
    preIntroducedConstructorRM.resetModifiers(Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL);
    preIntroducedConstructorRM.resetReturnTypeToObjectArray();

    pre.binding = world.makeMethodBinding(preIntroducedConstructorRM);

    pre.bindArguments();
    pre.bindThrownExceptions();
View Full Code Here

    if (interTypeScope == null)
      return null; // We encountered a problem building the scope, don't continue - error already reported

    // This signature represents what we want consumers of the targetted type to 'see'
    ResolvedMemberImpl signature = world.makeResolvedMemberForITD(binding, onTypeBinding, interTypeScope.getRecoveryAliases());
    signature.resetKind(Member.CONSTRUCTOR);
    signature.resetName("<init>");
    int resetModifiers = declaredModifiers;
    if (binding.isVarargs())
      resetModifiers = resetModifiers | Constants.ACC_VARARGS;
    signature.resetModifiers(resetModifiers);

    ResolvedMember syntheticInterMember = AjcMemberMaker.interConstructor(declaringTypeX, signature, aspectType);

    NewConstructorTypeMunger myMunger = new NewConstructorTypeMunger(signature, syntheticInterMember, null, null,
        typeVariableAliases);
View Full Code Here

      if (explicitConstructor instanceof ParameterizedMethodBinding) {
        explicitConstructor = explicitConstructor.original();
      }
      ((NewConstructorTypeMunger) munger).setExplicitConstructor(world.makeResolvedMember(explicitConstructor));
    } else {
      ((NewConstructorTypeMunger) munger).setExplicitConstructor(new ResolvedMemberImpl(Member.CONSTRUCTOR, world
          .fromBinding(onTypeBinding.superclass()), 0, ResolvedType.VOID, "<init>", UnresolvedType.NONE));
    }
    return new AjAttribute.TypeMunger(munger);
  }
View Full Code Here

        }
      }

      // XXX this is where we should remove unavailable args if we're in a cflow
      EclipseFactory factory = EclipseFactory.fromScopeLookupEnvironment(scope);
      ifPointcut.testMethod = new ResolvedMemberImpl(Member.METHOD, factory.fromBinding(binding.declaringClass),
          this.modifiers, ResolvedType.BOOLEAN, new String(this.selector), factory.fromBindings(this.binding.parameters));
    }
  }
View Full Code Here

    ret.inAspect = inAspect;
    if (inAspect.isAbstract()) {
      return ret;
    }

    Member cflowStackField = new ResolvedMemberImpl(Member.FIELD, inAspect, Modifier.STATIC | Modifier.PUBLIC | Modifier.FINAL,
        UnresolvedType.forName(NameMangler.CFLOW_STACK_TYPE), NameMangler.PERCFLOW_FIELD_NAME, UnresolvedType.NONE);

    World world = inAspect.getWorld();

    CrosscuttingMembers xcut = inAspect.crosscuttingMembers;
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.ResolvedMemberImpl

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.