Package org.aspectj.weaver

Examples of org.aspectj.weaver.UnresolvedType


      return null
    }
    // System.out.println("pc: " + getPointcut() + ", " + getPointcut().state);
    ReferenceBinding declaringClass = binding.declaringClass;
    TypeBinding[] parameters = binding.parameters;
    UnresolvedType utDeclaringClass = inWorld.fromBinding(declaringClass);
    UnresolvedType[] utParameters = inWorld.fromBindings(parameters);
    resolvedPointcutDeclaration = new ResolvedPointcutDefinition(utDeclaringClass, declaredModifiers, declaredName,
        utParameters, getPointcut()); // ??? might want to
    // use null
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)) {
        ret[i] = new FormalBinding.ImplicitFormalBinding(type, name, i);
View Full Code Here

  }

  private TypeBinding generatePerObjectInterface(ClassFile classFile) {
    final EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(this.scope);
    UnresolvedType interfaceTypeX = AjcMemberMaker.perObjectInterfaceType(typeX);
    HelperInterfaceBinding interfaceType = new HelperInterfaceBinding(this.binding, interfaceTypeX);
    world.addTypeBindingAndStoreInWorld(interfaceType);
    interfaceType.addMethod(world, AjcMemberMaker.perObjectInterfaceGet(typeX));
    interfaceType.addMethod(world, AjcMemberMaker.perObjectInterfaceSet(typeX));
    interfaceType.generateClass(compilationResult, classFile);
View Full Code Here

      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

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

    // 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());
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);
  }
View Full Code Here

        fieldMunger.version == NewFieldTypeMunger.VersionTwo), munger.getTypeVariableAliases());

    codeStream.initializeMaxLocals(binding);
    if (isGetter) {
      if (onTypeBinding.isInterface()) {
        UnresolvedType declaringTX = sig.getDeclaringType();
        ResolvedType declaringRTX = world.getWorld().resolve(declaringTX, munger.getSourceLocation());
        MethodBinding readMethod = world.makeMethodBinding(AjcMemberMaker.interFieldInterfaceGetter(sig, declaringRTX,
            aspectType), munger.getTypeVariableAliases());
        generateInterfaceReadBody(binding, readMethod, codeStream);
      } else {
View Full Code Here

      DeclareParents dp = (DeclareParents) declareDecl;
      String childPattern = dp.getChild().toString();
      Collection parentPatterns = dp.getParents().getExactTypes();
      StringBuffer parents = new StringBuffer();
      for (Iterator iter = parentPatterns.iterator(); iter.hasNext();) {
        UnresolvedType urt = ((UnresolvedType) iter.next());
        parents.append(urt.getName());
        if (iter.hasNext()) {
          parents.append(", ");
        }
      }
      annotation = AtAspectJAnnotationFactory.createDeclareParentsAnnotation(childPattern, parents.toString(),
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

  }

  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

TOP

Related Classes of org.aspectj.weaver.UnresolvedType

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.