Package org.aspectj.weaver

Examples of org.aspectj.weaver.TypeVariableReferenceType


      }
      // stash it
      this.getResolvedTypeX().getWorld().recordTypeVariablesCurrentlyBeingProcessed(getBaseClass(), rTypeVariables);
      // now fill in the details...
      for (int i = 0; i < tVars.length; i++) {
        TypeVariableReferenceType tvrt = ((TypeVariableReferenceType) typeConverter.fromType(tVars[i]));
        TypeVariable tv = tvrt.getTypeVariable();
        rTypeVariables[i].setSuperclass(tv.getSuperclass());
        rTypeVariables[i].setAdditionalInterfaceBounds(tv.getSuperInterfaces());
        rTypeVariables[i].setDeclaringElement(tv.getDeclaringElement());
        rTypeVariables[i].setDeclaringElementKind(tv.getDeclaringElementKind());
        rTypeVariables[i].setRank(tv.getRank());
View Full Code Here


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

  public void resolve(IScope scope) {
    exception = exception.resolveBindings(scope, null, false, true);
    ResolvedType excType = exception.getExactType().resolve(scope.getWorld());
    if (!excType.isMissing()) {
      if (excType.isTypeVariableReference()) {
        TypeVariableReferenceType typeVariableRT = (TypeVariableReferenceType) excType;
        // a declare soft in a generic abstract aspect, we need to check the upper bound
        // WIBBLE
        excType = typeVariableRT.getTypeVariable().getFirstBound().resolve(scope.getWorld());
      }
      if (!scope.getWorld().getCoreType(UnresolvedType.THROWABLE).isAssignableFrom(excType)) {
        scope.getWorld()
            .showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.NOT_THROWABLE, excType.getName()),
                exception.getSourceLocation(), null);
View Full Code Here

    }
    if (typeVarBounds == null) {
      // blowing up here breaks the situation with ITDs where the type variable is mentioned in the
      // declaring type and used somewhere in the signature. Temporary change to allow it to return just a
      // 'dumb' typevariablereference.
      return new TypeVariableReferenceType(new TypeVariable(aTypeVarSig.typeVariableName), world);
      // throw new GenericSignatureFormatException("Undeclared type variable in signature: " + aTypeVarSig.typeVariableName);
    }
    if (inProgressTypeVariableResolutions.containsKey(typeVarBounds)) {
      return inProgressTypeVariableResolutions.get(typeVarBounds);
    }
    inProgressTypeVariableResolutions.put(typeVarBounds, new FTPHolder(typeVarBounds, world));
    ReferenceType ret = new TypeVariableReferenceType(formalTypeParameter2TypeVariable(typeVarBounds, typeParams, world,
        inProgressTypeVariableResolutions), world);
    inProgressTypeVariableResolutions.put(typeVarBounds, ret);
    return ret;
  }
View Full Code Here

       * 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) {
      TypeVariableReferenceType inprogressVar = typeVariablesInProgress.get(aType);
      if (inprogressVar != null) {
        return inprogressVar;
      }

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

      }
      // stash it
      this.getResolvedTypeX().getWorld().recordTypeVariablesCurrentlyBeingProcessed(getBaseClass(), rTypeVariables);
      // now fill in the details...
      for (int i = 0; i < tVars.length; i++) {
        TypeVariableReferenceType tvrt = ((TypeVariableReferenceType) typeConverter.fromType(tVars[i]));
        TypeVariable tv = tvrt.getTypeVariable();
        rTypeVariables[i].setSuperclass(tv.getSuperclass());
        rTypeVariables[i].setAdditionalInterfaceBounds(tv.getSuperInterfaces());
        rTypeVariables[i].setDeclaringElement(tv.getDeclaringElement());
        rTypeVariables[i].setDeclaringElementKind(tv.getDeclaringElementKind());
        rTypeVariables[i].setRank(tv.getRank());
View Full Code Here

    }
    if (typeVarBounds == null) {
      // blowing up here breaks the situation with ITDs where the type variable is mentioned in the
      // declaring type and used somewhere in the signature. Temporary change to allow it to return just a
      // 'dumb' typevariablereference.
      return new TypeVariableReferenceType(new TypeVariable(aTypeVarSig.typeVariableName), world);
      // throw new GenericSignatureFormatException("Undeclared type variable in signature: " + aTypeVarSig.typeVariableName);
    }
    if (inProgressTypeVariableResolutions.containsKey(typeVarBounds)) {
      return (ResolvedType) inProgressTypeVariableResolutions.get(typeVarBounds);
    }
    inProgressTypeVariableResolutions.put(typeVarBounds, new FTPHolder(typeVarBounds, world));
    ResolvedType ret = new TypeVariableReferenceType(formalTypeParameter2TypeVariable(typeVarBounds, typeParams, world,
        inProgressTypeVariableResolutions), world);
    inProgressTypeVariableResolutions.put(typeVarBounds, ret);
    return ret;
  }
View Full Code Here

      }
      // stash it
      this.getResolvedTypeX().getWorld().recordTypeVariablesCurrentlyBeingProcessed(getBaseClass(),typeVariables);
      // now fill in the details...
      for (int i = 0; i < tVars.length; i++) {
        TypeVariableReferenceType tvrt = ((TypeVariableReferenceType) typeConverter.fromType(tVars[i]));
        TypeVariable tv = tvrt.getTypeVariable();
        typeVariables[i].setUpperBound(tv.getUpperBound());
        typeVariables[i].setAdditionalInterfaceBounds(tv.getAdditionalInterfaceBounds());
        typeVariables[i].setDeclaringElement(tv.getDeclaringElement());
        typeVariables[i].setDeclaringElementKind(tv.getDeclaringElementKind());
        typeVariables[i].setRank(tv.getRank());
View Full Code Here

      if (typeVariablesInProgress.get(aType)!=null) // check if we are already working on this type
        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);
View Full Code Here

    }
    if (typeVarBounds == null) {
      // blowing up here breaks the situation with ITDs where the type variable is mentioned in the
      // declaring type and used somewhere in the signature.  Temporary change to allow it to return just a
      // 'dumb' typevariablereference.
      return new TypeVariableReferenceType(new TypeVariable(aTypeVarSig.typeVariableName),world);
      // throw new GenericSignatureFormatException("Undeclared type variable in signature: " + aTypeVarSig.typeVariableName);
    }
    if (inProgressTypeVariableResolutions.containsKey(typeVarBounds)) {
      return (ResolvedType) inProgressTypeVariableResolutions.get(typeVarBounds);
    }
    inProgressTypeVariableResolutions.put(typeVarBounds,new FTPHolder(typeVarBounds,world));
    ResolvedType ret = new TypeVariableReferenceType(
        formalTypeParameter2TypeVariable(typeVarBounds,typeParams,world,inProgressTypeVariableResolutions),
        world);
    inProgressTypeVariableResolutions.put(typeVarBounds,ret);
    return ret;
  }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.TypeVariableReferenceType

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.