public static final class ITypeSystem.NullTypeSystem extends java.lang.Object implements ITypeSystem
ITypeSystem
that can be used by the abstract pattern language module.ITypeSystem.NullTypeSystem
Constructor and Description |
---|
NullTypeSystem() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<IInputKey> |
addTypeInformation(java.util.Set<IInputKey> types,
IInputKey newType)
Adds a new type descriptor to a collection of type descriptors, and minimizes it.
|
java.util.Set<IInputKey> |
addTypeInformation(java.util.Set<IInputKey> types,
java.util.Set<IInputKey> newTypes) |
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.
|
java.util.Set<IInputKey> |
getCompatibleSupertypes(java.util.Set<IInputKey> types)
Returns a set of types that is a common supertype of a set of type parameters
|
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 |
isValidType(Type type)
Returns whether the type declaration represents a valid, resolvable type for the selected type system.
|
java.util.Set<IInputKey> |
minimizeTypeInformation(java.util.Set<IInputKey> types,
boolean mergeWithSupertypes)
Reduces the type descriptor set by providing the most specific set of type descriptors inferrable for a selected
types.
|
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.
|
java.lang.String |
typeString(IInputKey type)
Converts a type object to a user-visible description string.
|
public boolean isConformant(IInputKey expectedType, IInputKey actualType)
ITypeSystem
isConformant
in interface ITypeSystem
public boolean isConformToRelationColumn(IInputKey relationType, int columnIndex, IInputKey columnType)
ITypeSystem
isConformToRelationColumn
in interface ITypeSystem
public IInputKey extractTypeDescriptor(Type type)
ITypeSystem
extractTypeDescriptor
in interface ITypeSystem
type
- either the Type
or the RelationType
instancepublic IInputKey extractColumnDescriptor(RelationType type, int columnIndex)
ITypeSystem
extractColumnDescriptor
in interface ITypeSystem
public org.eclipse.xtext.common.types.JvmTypeReference toJvmTypeReference(IInputKey type, org.eclipse.emf.ecore.EObject context)
ITypeSystem
toJvmTypeReference
in interface ITypeSystem
public java.lang.String typeString(IInputKey type)
ITypeSystem
typeString
in interface ITypeSystem
type
- either a Type
, or a model-specific type instancepublic java.util.Set<IInputKey> minimizeTypeInformation(java.util.Set<IInputKey> types, boolean mergeWithSupertypes)
ITypeSystem
minimizeTypeInformation
in interface ITypeSystem
types
- a collection of type definitionsmergeWithSupertypes
- if true, the collection is also minimized by calculating common supertypespublic java.util.Set<IInputKey> addTypeInformation(java.util.Set<IInputKey> types, IInputKey newType)
ITypeSystem
#minimizeTypeInformation(Set)
with types.add(newType)
, but might have a more
efficient impementation.addTypeInformation
in interface ITypeSystem
public java.util.Set<IInputKey> addTypeInformation(java.util.Set<IInputKey> types, java.util.Set<IInputKey> newTypes)
addTypeInformation
in interface ITypeSystem
public java.util.Set<IInputKey> getCompatibleSupertypes(java.util.Set<IInputKey> types)
ITypeSystem
getCompatibleSupertypes
in interface ITypeSystem
public boolean isValidType(Type type)
ITypeSystem
isValidType
in interface ITypeSystem