Class TypeConformanceComputer.CommonSuperTypeFinder
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.conformance.TypeConformanceComputer.CommonSuperTypeFinder
-
- Enclosing class:
- TypeConformanceComputer
@Beta protected class TypeConformanceComputer.CommonSuperTypeFinder extends java.lang.ObjectExtracted helper class to compute the common super type of an arbitrary list of given types. The interface of this class is subject to change.- Since:
- 2.14
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCommonSuperTypeFinder(ITypeReferenceOwner owner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddIdentifier(LightweightTypeReference type, java.util.Set<java.lang.String> allNames, java.util.Set<java.lang.String> allBoundNames)protected booleanallPrimitiveVoid(java.util.List<LightweightTypeReference> types)protected LightweightTypeReferencedoGetCommonSuperType(java.util.List<LightweightTypeReference> types)protected LightweightTypeReferencedoGetTypeParametersForSuperType(com.google.common.collect.Multimap<org.eclipse.xtext.common.types.JvmType,LightweightTypeReference> all, org.eclipse.xtext.common.types.JvmArrayType rawType, ITypeReferenceOwner owner, java.util.List<LightweightTypeReference> types)protected LightweightTypeReferencedoGetTypeParametersForSuperType(com.google.common.collect.Multimap<org.eclipse.xtext.common.types.JvmType,LightweightTypeReference> all, org.eclipse.xtext.common.types.JvmGenericType rawType, ITypeReferenceOwner owner, java.util.List<LightweightTypeReference> types)protected booleandoIsRecursiveRequest(java.util.List<LightweightTypeReference> types, java.util.Set<java.lang.String> allNames, java.util.List<LightweightTypeReference> initiallyRequested)protected booleanenhanceSuperType(java.util.List<LightweightTypeReference> superTypes, ParameterizedTypeReference result)protected LightweightTypeReferencefindConformsToAllOrVoid(java.util.List<LightweightTypeReference> types)protected LightweightTypeReferencegetCommonParameterSuperType(java.util.List<LightweightTypeReference> types)protected LightweightTypeReferencegetCommonSuperType(java.util.List<LightweightTypeReference> types)protected java.lang.StringgetIdentifier(LightweightTypeReference type)protected java.util.List<LightweightTypeReference>getMostSpecialCandidates(java.util.List<LightweightTypeReference> types, com.google.common.collect.Multimap<org.eclipse.xtext.common.types.JvmType,LightweightTypeReference> all, java.util.List<com.google.common.collect.Multiset.Entry<org.eclipse.xtext.common.types.JvmType>> candidates)protected LightweightTypeReferencegetMostSpecialTypeIfAllWildcards(java.util.List<LightweightTypeReference> types)protected LightweightTypeReferencegetTypeParametersForSuperType(com.google.common.collect.Multimap<org.eclipse.xtext.common.types.JvmType,LightweightTypeReference> all, org.eclipse.xtext.common.types.JvmType rawType, ITypeReferenceOwner owner, java.util.List<LightweightTypeReference> types)protected booleanhasTypeParameters(org.eclipse.xtext.common.types.JvmGenericType type)protected booleanisRecursiveRequest(java.util.List<LightweightTypeReference> types, java.util.Set<java.lang.String> allNames)protected voidpushRequestedTypes(java.util.List<LightweightTypeReference> types)protected LightweightTypeReferencewrapInCompoundTypeIfNecessary(java.util.List<LightweightTypeReference> referencesWithSameDistance)
-
-
-
Constructor Detail
-
CommonSuperTypeFinder
protected CommonSuperTypeFinder(ITypeReferenceOwner owner)
-
-
Method Detail
-
getCommonSuperType
protected LightweightTypeReference getCommonSuperType(java.util.List<LightweightTypeReference> types)
-
doGetCommonSuperType
protected LightweightTypeReference doGetCommonSuperType(java.util.List<LightweightTypeReference> types)
-
wrapInCompoundTypeIfNecessary
protected LightweightTypeReference wrapInCompoundTypeIfNecessary(java.util.List<LightweightTypeReference> referencesWithSameDistance)
-
getMostSpecialCandidates
protected java.util.List<LightweightTypeReference> getMostSpecialCandidates(java.util.List<LightweightTypeReference> types, com.google.common.collect.Multimap<org.eclipse.xtext.common.types.JvmType,LightweightTypeReference> all, java.util.List<com.google.common.collect.Multiset.Entry<org.eclipse.xtext.common.types.JvmType>> candidates)
-
findConformsToAllOrVoid
protected LightweightTypeReference findConformsToAllOrVoid(java.util.List<LightweightTypeReference> types)
-
allPrimitiveVoid
protected boolean allPrimitiveVoid(java.util.List<LightweightTypeReference> types)
-
getTypeParametersForSuperType
protected LightweightTypeReference getTypeParametersForSuperType(com.google.common.collect.Multimap<org.eclipse.xtext.common.types.JvmType,LightweightTypeReference> all, org.eclipse.xtext.common.types.JvmType rawType, ITypeReferenceOwner owner, java.util.List<LightweightTypeReference> types)
-
doGetTypeParametersForSuperType
protected LightweightTypeReference doGetTypeParametersForSuperType(com.google.common.collect.Multimap<org.eclipse.xtext.common.types.JvmType,LightweightTypeReference> all, org.eclipse.xtext.common.types.JvmArrayType rawType, ITypeReferenceOwner owner, java.util.List<LightweightTypeReference> types)
-
doGetTypeParametersForSuperType
protected LightweightTypeReference doGetTypeParametersForSuperType(com.google.common.collect.Multimap<org.eclipse.xtext.common.types.JvmType,LightweightTypeReference> all, org.eclipse.xtext.common.types.JvmGenericType rawType, ITypeReferenceOwner owner, java.util.List<LightweightTypeReference> types)
-
pushRequestedTypes
protected void pushRequestedTypes(java.util.List<LightweightTypeReference> types)
-
enhanceSuperType
protected boolean enhanceSuperType(java.util.List<LightweightTypeReference> superTypes, ParameterizedTypeReference result)
-
hasTypeParameters
protected boolean hasTypeParameters(org.eclipse.xtext.common.types.JvmGenericType type)
-
getCommonParameterSuperType
protected LightweightTypeReference getCommonParameterSuperType(java.util.List<LightweightTypeReference> types)
-
isRecursiveRequest
protected boolean isRecursiveRequest(java.util.List<LightweightTypeReference> types, java.util.Set<java.lang.String> allNames)
-
doIsRecursiveRequest
protected boolean doIsRecursiveRequest(java.util.List<LightweightTypeReference> types, java.util.Set<java.lang.String> allNames, java.util.List<LightweightTypeReference> initiallyRequested)
-
addIdentifier
protected void addIdentifier(LightweightTypeReference type, java.util.Set<java.lang.String> allNames, java.util.Set<java.lang.String> allBoundNames)
-
getIdentifier
protected java.lang.String getIdentifier(LightweightTypeReference type)
-
getMostSpecialTypeIfAllWildcards
protected LightweightTypeReference getMostSpecialTypeIfAllWildcards(java.util.List<LightweightTypeReference> types)
-
-