Class AbstractTypeComputer
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.computation.AbstractTypeComputer
-
- Direct Known Subclasses:
CollectionLiteralsTypeComputer
,XbaseTypeComputer
public class AbstractTypeComputer extends java.lang.Object
Base class for type computers, e.g. theXbaseTypeComputer
or theCollectionLiteralsTypeComputer
. Offers access to the common services along with a few useful methods that allow to obtain type references for classes.- Since:
- 2.8
-
-
Constructor Summary
Constructors Constructor Description AbstractTypeComputer()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
deferredBindTypeArgument(LightweightTypeReference declared, LightweightTypeReference actual, ITypeComputationState state)
protected <Type extends org.eclipse.xtext.common.types.JvmType>
TypefindDeclaredType(java.lang.Class<?> clazz, ITypeComputationState state)
protected <Type extends org.eclipse.xtext.common.types.JvmType>
TypefindDeclaredType(java.lang.Class<?> clazz, ITypeReferenceOwner owner)
protected <Type extends org.eclipse.xtext.common.types.JvmType>
TypefindDeclaredType(java.lang.String clazzName, ITypeComputationState state)
protected <Type extends org.eclipse.xtext.common.types.JvmType>
TypefindDeclaredType(java.lang.String clazzName, ITypeReferenceOwner owner)
protected LightweightTypeReference
getCommonSuperType(java.util.List<LightweightTypeReference> types, ITypeComputationState state)
Computes the common super type for the given list of types.protected LightweightTypeReference
getCommonSuperType(java.util.List<LightweightTypeReference> types, ITypeReferenceOwner owner)
Computes the common super type for the given list of types.protected LightweightTypeReference
getPrimitiveVoid(ITypeComputationState state)
protected LightweightTypeReference
getRawTypeForName(java.lang.Class<?> clazz, ITypeComputationState state)
protected LightweightTypeReference
getRawTypeForName(java.lang.Class<?> clazz, ITypeReferenceOwner owner)
Deprecated.useITypeReferenceOwner.newReferenceTo(Class)
instead.protected LightweightTypeReference
getRawTypeForName(java.lang.String clazzName, ITypeComputationState state)
protected LightweightTypeReference
getTypeForName(java.lang.Class<?> clazz, ITypeComputationState state)
protected LightweightTypeReference
getTypeForName(java.lang.String clazzName, ITypeComputationState state)
-
-
-
Method Detail
-
getTypeForName
protected LightweightTypeReference getTypeForName(java.lang.Class<?> clazz, ITypeComputationState state)
-
getTypeForName
protected LightweightTypeReference getTypeForName(java.lang.String clazzName, ITypeComputationState state)
- Since:
- 2.14
- See Also:
findDeclaredType(String, ITypeReferenceOwner)
-
getRawTypeForName
protected LightweightTypeReference getRawTypeForName(java.lang.Class<?> clazz, ITypeComputationState state)
-
getRawTypeForName
protected LightweightTypeReference getRawTypeForName(java.lang.String clazzName, ITypeComputationState state)
- Since:
- 2.14
-
getRawTypeForName
@Deprecated protected LightweightTypeReference getRawTypeForName(java.lang.Class<?> clazz, ITypeReferenceOwner owner)
Deprecated.useITypeReferenceOwner.newReferenceTo(Class)
instead.
-
findDeclaredType
protected <Type extends org.eclipse.xtext.common.types.JvmType> Type findDeclaredType(java.lang.Class<?> clazz, ITypeComputationState state)
-
findDeclaredType
protected <Type extends org.eclipse.xtext.common.types.JvmType> Type findDeclaredType(java.lang.String clazzName, ITypeComputationState state)
- Since:
- 2.14
- See Also:
findDeclaredType(String, ITypeReferenceOwner)
-
findDeclaredType
protected <Type extends org.eclipse.xtext.common.types.JvmType> Type findDeclaredType(java.lang.Class<?> clazz, ITypeReferenceOwner owner)
-
findDeclaredType
protected <Type extends org.eclipse.xtext.common.types.JvmType> Type findDeclaredType(java.lang.String clazzName, ITypeReferenceOwner owner)
- Parameters:
clazzName
- FQN of the type to find. seeIJvmTypeProvider.findTypeByName(String)
.owner
- the reference owner- Since:
- 2.14
-
getPrimitiveVoid
protected LightweightTypeReference getPrimitiveVoid(ITypeComputationState state)
-
getCommonSuperType
protected LightweightTypeReference getCommonSuperType(java.util.List<LightweightTypeReference> types, ITypeComputationState state)
Computes the common super type for the given list of types. The list may not be empty.
-
getCommonSuperType
protected LightweightTypeReference getCommonSuperType(java.util.List<LightweightTypeReference> types, ITypeReferenceOwner owner)
Computes the common super type for the given list of types. The list may not be empty.
-
deferredBindTypeArgument
protected void deferredBindTypeArgument(LightweightTypeReference declared, LightweightTypeReference actual, ITypeComputationState state)
-
-