Community
Participate
Working Groups
// resolve any array bindings which reference the unresolvedType
ReferenceBinding cachedType = packageBinding.getType0(binaryBinding.compoundName[binaryBinding.compoundName.length - 1]);
if (cachedType != null) { // update reference to unresolved binding after having read classfile (knows whether generic for raw conversion)
// TODO (kent) suspect the check below is no longer required, since we should not be requesting a binary which is already in the cache
if (cachedType instanceof UnresolvedReferenceBinding) {
if (cachedType.isBinaryBinding()) // sanity check before the cast... at this point the cache should ONLY contain unresolved types
((UnresolvedReferenceBinding) cachedType).setResolvedType(binaryBinding, this);
return (BinaryTypeBinding) cachedType;
} else {
if (cachedType.isBinaryBinding()) // sanity check... at this point the cache should ONLY contain unresolved types
// it is possible with a large number of source files (exceeding AbstractImageBuilder.MAX_AT_ONCE) that a member type can be in the cache as an UnresolvedType,
// but because its enclosingType is resolved while its created (call to BinaryTypeBinding constructor), its replaced with a source type
return null;
}
packageBinding.addType(binaryBinding);