} else if (aType instanceof java.lang.reflect.TypeVariable) {
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);
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) {