public static final ResolvedType[] EMPTY_RESOLVED_TYPE_ARRAY = new ResolvedType[0];
public static final String PARAMETERIZED_TYPE_IDENTIFIER = "P";
-
+
+
// Set during a type pattern match call - this currently used to hold the annotations
// that may be attached to a type when it used as a parameter
public ResolvedType[] temporaryAnnotationTypes;
return false;
}
- /**
- * Note: Only overridden by Name subtype
- */
- public void addAnnotation(AnnotationX annotationX) {
- throw new RuntimeException("ResolvedType.addAnnotation() should never be called");
- }
+
+ public void addAnnotation(AnnotationX annotationX) {
+ throw new RuntimeException("ResolvedType.addAnnotation() should never be called");
+ }
- /**
- * Note: Only overridden by Name subtype
- */
public AnnotationX[] getAnnotations() {
throw new RuntimeException("ResolvedType.getAnnotations() should never be called");
}
}
for (int i = 0; i < typeParameters.length; i++) {
- UnresolvedType aType = (ResolvedType)typeParameters[i];
+ ResolvedType aType = (ResolvedType)typeParameters[i];
if (aType.isTypeVariableReference() &&
// assume the worst - if its definetly not a type declared one, it could be anything
((TypeVariableReference)aType).getTypeVariable().getDeclaringElementKind()!=TypeVariable.TYPE) {
}
}
if (aType.isGenericWildcard()) {
- if (aType.isExtends()) {
+ BoundedReferenceType boundedRT = (BoundedReferenceType) aType;
+ if (boundedRT.isExtends()) {
boolean b = false;
- UnresolvedType upperBound = aType.getUpperBound();
+ UnresolvedType upperBound = boundedRT.getUpperBound();
if (upperBound.isParameterizedType()) {
b = upperBound.isParameterizedWithAMemberTypeVariable();
} else if (upperBound.isTypeVariableReference() && ((TypeVariableReference)upperBound).getTypeVariable().getDeclaringElementKind()==TypeVariable.METHOD) {
}
// FIXME asc need to check additional interface bounds
}
- if (aType.isSuper()) {
+ if (boundedRT.isSuper()) {
boolean b = false;
- UnresolvedType lowerBound = aType.getLowerBound();
+ UnresolvedType lowerBound = boundedRT.getLowerBound();
if (lowerBound.isParameterizedType()) {
b = lowerBound.isParameterizedWithAMemberTypeVariable();
} else if (lowerBound.isTypeVariableReference() && ((TypeVariableReference)lowerBound).getTypeVariable().getDeclaringElementKind()==TypeVariable.METHOD) {
public String getBinaryPath() {
return binaryPath;
}
+
}