Examples of fromBinding()


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

  private MethodDeclaration makePreMethod(ClassScope scope, ExplicitConstructorCall explicitConstructorCall) {
    EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(scope);

    UnresolvedType aspectTypeX = world.fromBinding(binding.declaringClass);
    UnresolvedType targetTypeX = world.fromBinding(onTypeBinding);

    ArrayBinding objectArrayBinding = scope.createArrayType(scope.getJavaLangObject(), 1);

    MethodDeclaration pre = new MethodDeclaration(compilationResult);
    pre.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccStatic;
View Full Code Here

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

        init.expressions[index++] = new NullLiteral(0, 0);
        continue;
      }

      Expression arg = explicitConstructorCall.arguments[i];
      ResolvedMember conversionMethod = AjcMemberMaker.toObjectConversionMethod(world
          .fromBinding(explicitConstructorCall.binding.parameters[i]));
      if (conversionMethod != null) {
        arg = new KnownMessageSend(world.makeMethodBindingForCall(conversionMethod), new CastExpression(new NullLiteral(0,
            0), AstUtil.makeTypeReference(world.makeTypeBinding(AjcMemberMaker.CONVERSIONS_TYPE))),
            new Expression[] { arg });
View Full Code Here

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

    }

    for (int i = 0; i < nParams; i++) {
      LocalVariableBinding binding = pre.arguments[i].binding;
      Expression arg = AstUtil.makeResolvedLocalVariableReference(binding);
      ResolvedMember conversionMethod = AjcMemberMaker.toObjectConversionMethod(world.fromBinding(binding.type));
      if (conversionMethod != null) {
        arg = new KnownMessageSend(world.makeMethodBindingForCall(conversionMethod), new CastExpression(new NullLiteral(0,
            0), AstUtil.makeTypeReference(world.makeTypeBinding(AjcMemberMaker.CONVERSIONS_TYPE))),
            new Expression[] { arg });
      }
View Full Code Here

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

    NewConstructorTypeMunger myMunger = new NewConstructorTypeMunger(signature, syntheticInterMember, null, null,
        typeVariableAliases);
    setMunger(myMunger);
    myMunger.check(world.getWorld());

    this.selector = binding.selector = NameMangler.postIntroducedConstructor(world.fromBinding(binding.declaringClass),
        declaringTypeX).toCharArray();

    return new EclipseTypeMunger(world, myMunger, aspectType, this);
  }
View Full Code Here

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

      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, "field type can not be void");
    }
View Full Code Here

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

      super.binding.parameters = new TypeBinding[] { onTypeBinding, };
      this.arguments = new Argument[] { 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) {
View Full Code Here

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

  }

  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(EclipseFactory world, ResolvedMember sig, UnresolvedType aspectType, ClassScope classScope,
View Full Code Here

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

  }

  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

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

    });
  }

  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
        BranchLabel wrongType = new BranchLabel(codeStream);
        codeStream.aload_0();
        codeStream.instance_of(interfaceType);
View Full Code Here

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

    // Code:
    /*
     * Code: Stack=1, Locals=1, Args_size=1 0: aload_0 1: getfield #14; //Field ajc$withinType:Ljava/lang/String; 4: areturn
     */
    generateMethod(classFile,
        AjcMemberMaker.perTypeWithinGetWithinTypeNameMethod(world.fromBinding(binding), world.getWorld().isInJava5Mode()),
        new BodyGenerator() {
          public void generate(CodeStream codeStream) {
            ExceptionLabel exc = new ExceptionLabel(codeStream, world.makeTypeBinding(UnresolvedType.JL_EXCEPTION));
            exc.placeStart();
            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.