Package org.aspectj.ajdt.internal.compiler.lookup

Examples of org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.fromBinding()


    if (hasPost) {
      final EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(classScope);

      codeStream.invokestatic(world.makeMethodBindingForCall(
        AjcMemberMaker.ajcPostClinitMethod(
          world.fromBinding(classScope.referenceContext.binding)
        )));
    }
   
    if (initFailureField != null) {
      // Changes to this exception handling code may require changes to
View Full Code Here


  }
 
  public void generateDispatchMethod(ClassScope classScope, ClassFile classFile) {
    EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(classScope);
   
    UnresolvedType aspectType = world.fromBinding(classScope.referenceContext.binding);
    ResolvedMember signature = munger.getSignature();
   
    ResolvedMember dispatchMember =
      AjcMemberMaker.interMethodDispatcher(signature, aspectType);
    MethodBinding dispatchBinding = world.makeMethodBinding(dispatchMember,munger.getTypeVariableAliases(),munger.getSignature().getDeclaringType());
View Full Code Here

      // now create a ResolvedPointcutDefinition,make an attribute out of it, and add it to the method
      UnresolvedType[] paramTypes = new UnresolvedType[bindings.length];
      for (int i = 0; i < paramTypes.length; i++) paramTypes[i] = bindings[i].getType();
      ResolvedPointcutDefinition resPcutDef =
        new ResolvedPointcutDefinition(
            factory.fromBinding(((TypeDeclaration)typeStack.peek()).binding),
            methodDeclaration.modifiers,
            "anonymous",
            paramTypes,
            pc
        );
View Full Code Here

    FormalBinding[] ret = new FormalBinding[mDecl.arguments.length];
    for (int i = 0; i < mDecl.arguments.length; i++) {
            Argument arg = mDecl.arguments[i];
            String name = new String(arg.name);
      TypeBinding argTypeBinding = mDecl.binding.parameters[i];
            UnresolvedType type = factory.fromBinding(argTypeBinding);
      if  (CharOperation.equals(joinPoint,argTypeBinding.signature()) ||
         CharOperation.equals(joinPointStaticPart,argTypeBinding.signature()) ||
         CharOperation.equals(joinPointEnclosingStaticPart,argTypeBinding.signature()) ||
         CharOperation.equals(proceedingJoinPoint,argTypeBinding.signature()) ||
         name.equals(extraArgName)) {
View Full Code Here

    if (munger == null) ignoreFurtherInvestigation = true;
    if (ignoreFurtherInvestigation) return;
   
    EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(upperScope);
    ResolvedMember sig = munger.getSignature();
    UnresolvedType aspectType = world.fromBinding(upperScope.referenceContext.binding);
   
    if (sig.getReturnType() == ResolvedType.VOID ||
        (sig.getReturnType().isArray() && (sig.getReturnType().getComponentType() == ResolvedType.VOID)))
    {
      upperScope.problemReporter().signalError(sourceStart, sourceEnd,
View Full Code Here

        AstUtil.makeFinalArgument("ajc$this_".toCharArray(), onTypeBinding),
      };
    }
   
    //System.err.println("type: " + binding.returnType + ", " + returnType);
    ResolvedType declaringType = world.fromBinding(onTypeBinding).resolve(world.getWorld());
    if (declaringType.isRawType() || declaringType.isParameterizedType()) {
      declaringType = declaringType.getGenericType();
    }
   
    if (interTypeScope==null) return null; // We encountered a problem building the scope, don't continue - error already reported
View Full Code Here

  }

  private void generateDispatchMethods(ClassScope classScope, ClassFile classFile) {
    EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(classScope);
    ResolvedMember sig = munger.getSignature();
    UnresolvedType aspectType = world.fromBinding(classScope.referenceContext.binding);
    generateDispatchMethod(world, sig, aspectType, classScope, classFile, true);
    generateDispatchMethod(world, sig, aspectType, classScope, classFile, false);
  }

  private void generateDispatchMethod(
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

  private void generatePerCflowAjcClinitMethod(
    ClassFile classFile)
  {
    final EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(this.scope);
    generateMethod(classFile, world.makeMethodBinding(AjcMemberMaker.ajcPreClinitMethod(
        world.fromBinding(binding))),
    new BodyGenerator() {
      public void generate(CodeStream codeStream) {
        // body starts here
        codeStream.new_(world.makeTypeBinding(AjcMemberMaker.CFLOW_STACK_TYPE));
        codeStream.dup();
View Full Code Here

  private void generatePerObjectBindMethod(
    ClassFile classFile,
    final TypeBinding interfaceType)
  {
    final EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(this.scope);
    generateMethod(classFile, AjcMemberMaker.perObjectBind(world.fromBinding(binding)),
    new BodyGenerator() {
      public void generate(CodeStream codeStream) {
        // body starts here
        Label wrongType = new Label(codeStream);
        codeStream.aload_0();
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.