return _bounds;
}
// This code is drawn from org.eclipse.jdt.core.dom.TypeBinding.getTypeBounds()
private List<? extends TypeMirror> calculateBounds() {
TypeVariableBinding typeVariableBinding = (TypeVariableBinding)_binding;
ReferenceBinding varSuperclass = typeVariableBinding.superclass();
TypeBinding firstClassOrArrayBound = typeVariableBinding.firstBound;
int boundsLength = 0;
boolean isFirstBoundATypeVariable = false;
if (firstClassOrArrayBound != null) {
if (firstClassOrArrayBound.isTypeVariable()) {
isFirstBoundATypeVariable = true;
}
if (firstClassOrArrayBound == varSuperclass) {
boundsLength++;
if (firstClassOrArrayBound.isTypeVariable()) {
isFirstBoundATypeVariable = true;
}
} 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;
}