@Override public LightweightTypeReference tryConvertToListType() { ArrayTypes arrayTypes = getServices().getArrayTypes(); return arrayTypes.convertToList(this); }
/** * Returns the array representation of this reference if its represents a sub-type of {@link Iterable}. * If the iterable's type is a primitive wrapper, the array is <em>not</em> the primitive array but * the wrapper array. May return <code>null</code> if the conversion is not possible. * * This is the externalized and thereby * exchangeable implementation of {@link ParameterizedTypeReference#tryConvertToArray()}. * * @param typeReference the to-be-converted reference. * @return an equivalent {@link ArrayTypeReference} or <code>null</code>. */ /* @Nullable */ public ArrayTypeReference tryConvertToArray(ParameterizedTypeReference typeReference) { ArrayTypeReference result = doTryConvertToArray(typeReference); if (result != null) { return result; } else { JvmType type = typeReference.getType(); if (type.eClass() == TypesPackage.Literals.JVM_TYPE_PARAMETER) { return doTryConvertToArray(typeReference, new RecursionGuard<JvmTypeParameter>()); } } return null; }
/** * {@inheritDoc} * * @see ArrayTypes#tryConvertToArray(ParameterizedTypeReference) */ @Override /* @Nullable */ public ArrayTypeReference tryConvertToArray() { ArrayTypes arrayTypes = getServices().getArrayTypes(); return arrayTypes.tryConvertToArray(this); }
return (ArrayTypeReference) superType; ArrayTypeReference result = doTryConvertToArray(typeReference); if (result != null) { return result; JvmType rawSuperType = superType.getType(); if (rawSuperType != null && rawSuperType.eClass() == TypesPackage.Literals.JVM_TYPE_PARAMETER) { result = doTryConvertToArray((ParameterizedTypeReference) superType, recursionGuard); if (result != null) return result;