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.Object
Extracted 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 protected
CommonSuperTypeFinder(ITypeReferenceOwner owner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addIdentifier(LightweightTypeReference type, java.util.Set<java.lang.String> allNames, java.util.Set<java.lang.String> allBoundNames)
protected boolean
allPrimitiveVoid(java.util.List<LightweightTypeReference> types)
protected LightweightTypeReference
doGetCommonSuperType(java.util.List<LightweightTypeReference> types)
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)
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)
protected boolean
doIsRecursiveRequest(java.util.List<LightweightTypeReference> types, java.util.Set<java.lang.String> allNames, java.util.List<LightweightTypeReference> initiallyRequested)
protected boolean
enhanceSuperType(java.util.List<LightweightTypeReference> superTypes, ParameterizedTypeReference result)
protected LightweightTypeReference
findConformsToAllOrVoid(java.util.List<LightweightTypeReference> types)
protected LightweightTypeReference
getCommonParameterSuperType(java.util.List<LightweightTypeReference> types)
protected LightweightTypeReference
getCommonSuperType(java.util.List<LightweightTypeReference> types)
protected java.lang.String
getIdentifier(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 LightweightTypeReference
getMostSpecialTypeIfAllWildcards(java.util.List<LightweightTypeReference> types)
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)
protected boolean
hasTypeParameters(org.eclipse.xtext.common.types.JvmGenericType type)
protected boolean
isRecursiveRequest(java.util.List<LightweightTypeReference> types, java.util.Set<java.lang.String> allNames)
protected void
pushRequestedTypes(java.util.List<LightweightTypeReference> types)
protected LightweightTypeReference
wrapInCompoundTypeIfNecessary(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)
-
-