public ITypeBinding[] getTypeBounds() {
if (this.bounds != null) {
return this.bounds;
}
if (this.binding instanceof TypeVariableBinding) {
TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
ReferenceBinding varSuperclass = typeVariableBinding.superclass();
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding firstClassOrArrayBound = typeVariableBinding.firstBound;
int boundsLength = 0;
if (firstClassOrArrayBound != null) {
if (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;
}