return this.prototype.getTypeBounds();
}
if (this.bounds != null) {
return this.bounds;
}
TypeVariableBinding typeVariableBinding = null;
if (this.binding instanceof TypeVariableBinding) {
typeVariableBinding = (TypeVariableBinding) this.binding;
} else if (this.binding instanceof WildcardBinding) {
WildcardBinding wildcardBinding = (WildcardBinding) this.binding;
typeVariableBinding = wildcardBinding.typeVariable();
}
if (typeVariableBinding != null) {
ReferenceBinding varSuperclass = typeVariableBinding.superclass();
org.eclipse.jdt.internal.compiler.lookup.TypeBinding firstClassOrArrayBound = typeVariableBinding.firstBound;
int boundsLength = 0;
if (firstClassOrArrayBound == null) {
if (varSuperclass != null && varSuperclass.id != TypeIds.T_JavaLangObject) {
firstClassOrArrayBound = varSuperclass;
boundsLength++;
}
} else {
if (org.eclipse.jdt.internal.compiler.lookup.TypeBinding.equalsEquals(firstClassOrArrayBound, varSuperclass)) {
boundsLength++;
} else if (firstClassOrArrayBound.isArrayType()) { // capture of ? extends/super arrayType
boundsLength++;
} else {
firstClassOrArrayBound = null;
}
}
ReferenceBinding[] superinterfaces = typeVariableBinding.superInterfaces();
int superinterfacesLength = 0;
if (superinterfaces != null) {
superinterfacesLength = superinterfaces.length;
boundsLength += superinterfacesLength;
}