public class EMFTypeSystem extends AbstractTypeSystem
ITypeSystem.NullTypeSystem
Constructor and Description |
---|
EMFTypeSystem(org.apache.log4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
static IInputKey |
classifierToInputKey(org.eclipse.emf.ecore.EClassifier classifier) |
IInputKey |
extractColumnDescriptor(RelationType type,
int columnIndex)
Extracts the model-specific column type of the given index from a RelationType declaration
|
IInputKey |
extractTypeDescriptor(Type type)
Extracts the model-specific types from a Type declaration.
|
boolean |
isConformant(ClassType expectedType,
ClassType actualType) |
boolean |
isConformant(IInputKey expectedType,
IInputKey actualType)
Decides whether the second type is compatible with the first one
|
boolean |
isConformToRelationColumn(IInputKey relationType,
int columnIndex,
IInputKey columnType)
Decides whether the reference can have a selected type at its given column.
|
boolean |
isConformToRelationSource(ReferenceType relationType,
ClassType sourceType) |
boolean |
isConformToRelationTarget(ReferenceType relationType,
ClassType targetType) |
org.eclipse.xtext.common.types.JvmTypeReference |
toJvmTypeReference(IInputKey type,
org.eclipse.emf.ecore.EObject context)
Creates a type reference for model inference from a selected type.
|
typeString
public IInputKey extractTypeDescriptor(Type type)
ITypeSystem
type
- either the Type
or the RelationType
instancepublic static IInputKey classifierToInputKey(org.eclipse.emf.ecore.EClassifier classifier)
public IInputKey extractColumnDescriptor(RelationType type, int columnIndex)
ITypeSystem
public boolean isConformant(IInputKey expectedType, IInputKey actualType)
ITypeSystem
public boolean isConformToRelationColumn(IInputKey relationType, int columnIndex, IInputKey columnType)
ITypeSystem
public boolean isConformToRelationSource(ReferenceType relationType, ClassType sourceType)
public boolean isConformToRelationTarget(ReferenceType relationType, ClassType targetType)
public org.eclipse.xtext.common.types.JvmTypeReference toJvmTypeReference(IInputKey type, org.eclipse.emf.ecore.EObject context)
ITypeSystem