public LightweightTypeReference getRawSuperType(JvmType rawType) { Object result = internalGetSuperType(rawType); if (result instanceof ParameterizedTypeReference) { return (LightweightTypeReference) result; } else if (result != null) { return createRawTypeReference(rawType); } return null; }
@Override /* @Nullable */ public LightweightTypeReference getSuperType(JvmType rawType) { Object rawResult = internalGetSuperType(rawType); if (rawResult instanceof ParameterizedTypeReference) { return (LightweightTypeReference) rawResult; } else if (rawResult != null) { JvmTypeReference superType = (JvmTypeReference) rawResult; if (isRawType()) { return createRawTypeReference(rawType); } if (superType.eClass() == TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE) { if (((JvmParameterizedTypeReference) superType).getArguments().isEmpty()) { return getOwner().newParameterizedTypeReference(rawType); } } LightweightTypeReference unresolved = getOwner().toLightweightTypeReference(rawType); TypeParameterSubstitutor<?> substitutor = createSubstitutor(); LightweightTypeReference result = substitutor.substitute(unresolved); return result; } return null; }