public class EM2TypeSetUtil
extends java.lang.Object
Constructor and Description |
---|
EM2TypeSetUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
contains(ErrorType supertype,
ErrorType type)
true if super type contains type as subtype
aliases are resolved before the error types are compared
|
static boolean |
contains(TypeSet ts,
ErrorType et)
true if TypeSet ts contains ErrorType et
The type set can represent a constraint
aliases are resolved before the error types are compared
|
static boolean |
contains(TypeSet ts,
TypeSet subts)
true if TypeSet ts contains TypeSet subts
The type set can represent a constraint, i.e., product types, and Type matching are taken into account
aliases are resolved before the error types are compared
|
static boolean |
contains(TypeSet ts,
TypeToken token)
true if TypeSet ts contains TypeToken token
The type set can represent a constraint
aliases are resolved before the error types are compared
|
static boolean |
contains(TypeToken constraint,
ErrorType type)
true if TypeToken constraint contains ErrorType type as one of its product elements
aliases are resolved before the error types are compared
|
static boolean |
contains(TypeToken constraint,
TypeToken token)
true if TypeToken constraint contains TypeToken token
aliases are resolved before the error types are compared
|
static org.eclipse.emf.common.util.EList<TypeToken> |
generateAllTypeTokens(TypeSet typeSet)
generate all type tokens for a given typeset.
|
static org.eclipse.emf.common.util.EList<TypeToken> |
generateTypeTokens(TypeSet typeSet)
generate all type tokens for a given typeset.
|
static org.eclipse.emf.common.util.EList<ErrorType> |
getAllLeafSubTypes(ErrorType et)
get list of subtypes of the given error type et excluding et itself
Each any error type alias has been resolved
|
static org.eclipse.emf.common.util.EList<ErrorType> |
getAllSubTypes(ErrorType et)
get all subtypes of ErrorType et in a new UniqueEList.
|
static boolean |
inSameTypeHierarchy(ErrorType et1,
ErrorType et2)
true if both error types are in teh same type hierarchy
|
static ErrorType |
mapType(ErrorType type,
TypeMappingSet tms)
map an error type into its target type using the type mapping set
|
static TypeToken |
mapTypes(TypeToken token,
TypeMappingSet tms)
map types in a token one type at a time using TypeMappingSet
It only maps individual element types based in ElementTypeMapping rules
Otherwise no mapping occurs.
|
static TypeToken |
mapTypeToken(TypeToken token,
TypeMappingSet tms)
map a TypeToken into a target type token according to the TypeMappingSet.
|
static ErrorType |
rootType(ErrorType et)
return the root ErrorType of ErrorType et
|
public static ErrorType rootType(ErrorType et)
et
- ErrorTypepublic static boolean inSameTypeHierarchy(ErrorType et1, ErrorType et2)
et1
- ErrorTypeet2
- ErrorTypepublic static boolean contains(ErrorType supertype, ErrorType type)
supertype
- type
- public static boolean contains(TypeToken constraint, ErrorType type)
constraint
- TypeTokentype
- ErrorTypepublic static boolean contains(TypeToken constraint, TypeToken token)
constraint
- TypeTokentoken
- TypeTokenpublic static boolean contains(TypeSet ts, TypeToken token)
ts
- TypeSettoken
- TypeTokenpublic static boolean contains(TypeSet ts, ErrorType et)
ts
- TypeSetet
- ErrorTypepublic static boolean contains(TypeSet ts, TypeSet subts)
ts
- TypeSetsubts
- TypeSetpublic static org.eclipse.emf.common.util.EList<TypeToken> generateTypeTokens(TypeSet typeSet)
typeSet
- public static org.eclipse.emf.common.util.EList<TypeToken> generateAllTypeTokens(TypeSet typeSet)
typeSet
- public static org.eclipse.emf.common.util.EList<ErrorType> getAllLeafSubTypes(ErrorType et)
context
- et
- public static org.eclipse.emf.common.util.EList<ErrorType> getAllSubTypes(ErrorType et)
et
- Error Typepublic static TypeToken mapTypeToken(TypeToken token, TypeMappingSet tms)
token
- TypeTokentms
- TypeMappingSetpublic static TypeToken mapTypes(TypeToken token, TypeMappingSet tms)
token
- TypeTokentms
- TypeMappingSetpublic static ErrorType mapType(ErrorType type, TypeMappingSet tms)
type
- ErrorTypetms
- TypeMappingset