@Override public boolean isResolved(Object handle) { return ResolvedTypes.this.isResolved(handle); }
protected void addNonRecursiveHints(LightweightBoundTypeArgument original, UnboundTypeReference reference, Set<Object> seenHandles, List<LightweightBoundTypeArgument> result) { Object otherHandle = reference.getHandle(); if (seenHandles.add(otherHandle)) { if (isResolved(otherHandle)) { result.addAll(getHints(otherHandle)); } else { addNonRecursiveHints(original, getHints(otherHandle), seenHandles, result); } } }
protected void mergeTypesIntoParent(ResolvedTypes parent) { Map<JvmIdentifiableElement, LightweightTypeReference> types = basicGetTypes(); if (!types.isEmpty()) { for(Map.Entry<JvmIdentifiableElement, LightweightTypeReference> entry: types.entrySet()) { LightweightTypeReference value = entry.getValue(); if (value instanceof UnboundTypeReference && super.isResolved(((UnboundTypeReference) value).getHandle())) { parent.setType(entry.getKey(), value.getUpperBoundSubstitute().copyInto(parent.getReferenceOwner())); } else { parent.setType(entry.getKey(), value.copyInto(parent.getReferenceOwner())); } } } }
@Override protected List<LightweightBoundTypeArgument> getHints(Object handle) { List<LightweightBoundTypeArgument> result = super.getHints(handle); if (result.size() == 1 && super.isResolved(handle)) { return result; if (parentHints.size() == 1 && getParent().isResolved(handle)) { LightweightBoundTypeArgument parentHint = parentHints.get(0); LightweightBoundTypeArgument copy = new LightweightBoundTypeArgument(
protected TypeData prepareMerge(TypeData typeData, ITypeReferenceOwner owner) { LightweightTypeReference typeReference = typeData.getActualType(); if (typeData.isOwnedBy(owner) && !(typeReference instanceof UnboundTypeReference)) return typeData; if (typeReference instanceof UnboundTypeReference && super.isResolved(((UnboundTypeReference) typeReference).getHandle())) { typeReference = typeReference.getUpperBoundSubstitute(); } return new TypeData(typeData.getExpression(), typeData.getExpectation().copyInto(owner), typeReference.copyInto(owner), typeData.getConformanceFlags(), typeData.isReturnType()); }
if (!parent.isResolved(hint.getKey())) { List<LightweightBoundTypeArgument> boundTypeArguments = hint.getValue(); for(LightweightBoundTypeArgument boundTypeArgument: boundTypeArguments) {
if (existingTypeReference instanceof UnboundTypeReference) { UnboundTypeReference existingReference = (UnboundTypeReference) existingTypeReference; if (!isResolved(existingReference.getHandle())) { if (!boundTypeReference.isWildcard()) { existingReference.acceptHint(boundTypeReference, if (existingTypeReference instanceof UnboundTypeReference) { UnboundTypeReference existingReference = (UnboundTypeReference) existingTypeReference; if (!isResolved(existingReference.getHandle())) {
if (!isResolved(handle)) { if (boundTypeArgument.getTypeReference() instanceof UnboundTypeReference && boundTypeArgument.getSource() != BoundTypeArgumentSource.CONSTRAINT) { UnboundTypeReference other = (UnboundTypeReference) boundTypeArgument.getTypeReference();