Examples of ResolvedType


Examples of org.aspectj.weaver.ResolvedType

  public static Shadow makeFieldGetShadow(World inWorld, Field forField, java.lang.reflect.Member inMember,
      MatchingContext withContext) {
    Shadow enclosingShadow = makeExecutionShadow(inWorld, inMember, withContext);
    Member signature = ReflectionBasedReferenceTypeDelegateFactory.createResolvedField(forField, inWorld);
    ResolvedMember enclosingMember = ReflectionBasedReferenceTypeDelegateFactory.createResolvedMember(inMember, inWorld);
    ResolvedType enclosingType = enclosingMember.getDeclaringType().resolve(inWorld);
    Kind kind = Shadow.FieldGet;
    return new StandardShadow(inWorld, kind, signature, enclosingShadow, enclosingType, enclosingMember, withContext);
  }
View Full Code Here

Examples of org.aspectj.weaver.ResolvedType

  public static Shadow makeFieldSetShadow(World inWorld, Field forField, Class callerType, MatchingContext withContext) {
    Shadow enclosingShadow = makeStaticInitializationShadow(inWorld, callerType, withContext);
    Member signature = ReflectionBasedReferenceTypeDelegateFactory.createResolvedField(forField, inWorld);
    ResolvedMember enclosingMember = ReflectionBasedReferenceTypeDelegateFactory.createStaticInitMember(callerType, inWorld);
    ResolvedType enclosingType = enclosingMember.getDeclaringType().resolve(inWorld);
    Kind kind = Shadow.FieldSet;
    return new StandardShadow(inWorld, kind, signature, enclosingShadow, enclosingType, enclosingMember, withContext);
  }
View Full Code Here

Examples of org.aspectj.weaver.ResolvedType

  public static Shadow makeFieldSetShadow(World inWorld, Field forField, java.lang.reflect.Member inMember,
      MatchingContext withContext) {
    Shadow enclosingShadow = makeExecutionShadow(inWorld, inMember, withContext);
    Member signature = ReflectionBasedReferenceTypeDelegateFactory.createResolvedField(forField, inWorld);
    ResolvedMember enclosingMember = ReflectionBasedReferenceTypeDelegateFactory.createResolvedMember(inMember, inWorld);
    ResolvedType enclosingType = enclosingMember.getDeclaringType().resolve(inWorld);
    Kind kind = Shadow.FieldSet;
    return new StandardShadow(inWorld, kind, signature, enclosingShadow, enclosingType, enclosingMember, withContext);
  }
View Full Code Here

Examples of org.aspectj.weaver.ResolvedType

   * (non-Javadoc)
   *
   * @see org.aspectj.weaver.Shadow#getKindedAnnotationVar(org.aspectj.weaver.UnresolvedType)
   */
  public Var getKindedAnnotationVar(UnresolvedType forAnnotationType) {
    ResolvedType annType = forAnnotationType.resolve(world);
    if (annotationVar.get(annType) == null) {
      Var v = ReflectionVar.createAtAnnotationVar(annType, this.annotationFinder);
      annotationVar.put(annType, v);
    }
    return (Var) annotationVar.get(annType);
View Full Code Here

Examples of org.aspectj.weaver.ResolvedType

   * (non-Javadoc)
   *
   * @see org.aspectj.weaver.Shadow#getWithinAnnotationVar(org.aspectj.weaver.UnresolvedType)
   */
  public Var getWithinAnnotationVar(UnresolvedType forAnnotationType) {
    ResolvedType annType = forAnnotationType.resolve(world);
    if (withinAnnotationVar.get(annType) == null) {
      Var v = ReflectionVar.createWithinAnnotationVar(annType, this.annotationFinder);
      withinAnnotationVar.put(annType, v);
    }
    return (Var) withinAnnotationVar.get(annType);
View Full Code Here

Examples of org.aspectj.weaver.ResolvedType

   * (non-Javadoc)
   *
   * @see org.aspectj.weaver.Shadow#getWithinCodeAnnotationVar(org.aspectj.weaver.UnresolvedType)
   */
  public Var getWithinCodeAnnotationVar(UnresolvedType forAnnotationType) {
    ResolvedType annType = forAnnotationType.resolve(world);
    if (withinCodeAnnotationVar.get(annType) == null) {
      Var v = ReflectionVar.createWithinCodeAnnotationVar(annType, this.annotationFinder);
      withinCodeAnnotationVar.put(annType, v);
    }
    return (Var) withinCodeAnnotationVar.get(annType);
View Full Code Here

Examples of org.aspectj.weaver.ResolvedType

   * (non-Javadoc)
   *
   * @see org.aspectj.weaver.Shadow#getArgAnnotationVar(int, org.aspectj.weaver.UnresolvedType)
   */
  public Var getArgAnnotationVar(int i, UnresolvedType forAnnotationType) {
    ResolvedType annType = forAnnotationType.resolve(world);
    if (atArgsVars.get(annType) == null) {
      Var[] vars = new Var[getArgCount()];
      atArgsVars.put(annType, vars);
    }
    Var[] vars = (Var[]) atArgsVars.get(annType);
View Full Code Here

Examples of org.aspectj.weaver.ResolvedType

      } else {
        return getWorld().resolve(name);
      }
    } else if (aType instanceof ParameterizedType) {
      ParameterizedType pt = (ParameterizedType) aType;
      ResolvedType baseType = fromType(pt.getRawType());
      Type[] args = pt.getActualTypeArguments();
      ResolvedType[] resolvedArgs = fromTypes(args);
/*      StringBuilder sb = new StringBuilder();
      for (int i = 0; i < resolvedArgs.length; i++) {
        sb.append(resolvedArgs[i]).append(" ");
      }
      for (int i = 0; i < resolvedArgs.length; i++) {
        if (resolvedArgs[i] == null) {
          String ss = "";
          try {
            ss = aType.toString();
          } catch (Exception e) {
          }
          throw new IllegalStateException("Parameterized type problem.  basetype=" + baseType + " arguments="
              + sb.toString() + " ss=" + ss);
        }
      }
*/
      return TypeFactory.createParameterizedType(baseType, resolvedArgs, getWorld());
    } else if (aType instanceof java.lang.reflect.TypeVariable) {
      if (typeVariablesInProgress.get(aType) != null) {
        return typeVariablesInProgress.get(aType);
      }

      java.lang.reflect.TypeVariable tv = (java.lang.reflect.TypeVariable) aType;
      TypeVariable rt_tv = new TypeVariable(tv.getName());
      TypeVariableReferenceType tvrt = new TypeVariableReferenceType(rt_tv, getWorld());

      typeVariablesInProgress.put(aType, tvrt); // record what we are working on, for recursion case

      Type[] bounds = tv.getBounds();
      ResolvedType[] resBounds = fromTypes(bounds);
      ResolvedType upperBound = resBounds[0];
      ResolvedType[] additionalBounds = new ResolvedType[0];
      if (resBounds.length > 1) {
        additionalBounds = new ResolvedType[resBounds.length - 1];
        System.arraycopy(resBounds, 1, additionalBounds, 0, additionalBounds.length);
      }
      rt_tv.setUpperBound(upperBound);
      rt_tv.setAdditionalInterfaceBounds(additionalBounds);

      typeVariablesInProgress.remove(aType); // we have finished working on it

      return tvrt;
    } else if (aType instanceof WildcardType) {
      WildcardType wildType = (WildcardType) aType;
      Type[] lowerBounds = wildType.getLowerBounds();
      Type[] upperBounds = wildType.getUpperBounds();
      ResolvedType bound = null;
      boolean isExtends = lowerBounds.length == 0;
      if (isExtends) {
        bound = fromType(upperBounds[0]);
      } else {
        bound = fromType(lowerBounds[0]);
View Full Code Here

Examples of org.aspectj.weaver.ResolvedType

      LazyMethodGen enclosingMethod) {
    int len = proceedParamTypes.length;
    BcelVar[] ret = new BcelVar[len];

    for (int i = len - 1; i >= 0; i--) {
      ResolvedType typeX = proceedParamTypes[i];
      Type type = BcelWorld.makeBcelType(typeX);
      int local = enclosingMethod.allocateLocal(type);

      il.append(InstructionFactory.createStore(type, local));
      ret[i] = new BcelVar(typeX, local);
View Full Code Here

Examples of org.aspectj.weaver.ResolvedType

    }

    // name must be undefined so far
    // TODO only convert the name to signature once, probably earlier than
    // this
    ResolvedType current = world.lookupBySignature(UnresolvedType.forName(concreteAspect.name).getSignature());

    if (current != null && !current.isMissing()) {
      reportError("Attempt to concretize but chosen aspect name already defined: " + stringify());
      return false;
    }

    // it can happen that extends is null, for precedence only declaration
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.