|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.ocl.types.impl.TypeUtil
Static utilities for introspecting OCL types.
Method Summary | |
---|---|
static org.eclipse.emf.ecore.EClassifier |
commonSuperType(org.eclipse.emf.ecore.EClassifier type1,
org.eclipse.emf.ecore.EClassifier type2)
Get the common supertype of two types. |
static org.eclipse.emf.ecore.EOperation |
defineOperation(org.eclipse.emf.ecore.EClassifier owner,
java.lang.String name,
org.eclipse.emf.common.util.EList params,
org.eclipse.emf.ecore.EClassifier type)
|
static org.eclipse.emf.ecore.EStructuralFeature |
defineProperty(org.eclipse.emf.ecore.EClassifier owner,
Variable variable)
|
static org.eclipse.emf.ecore.EOperation |
findOperationMatching(org.eclipse.emf.ecore.EClassifier owner,
java.lang.String name,
org.eclipse.emf.common.util.EList args)
Find the operation in the specified classifier |
static org.eclipse.emf.ecore.EClass |
findSignalMatching(org.eclipse.emf.ecore.EClassifier receiver,
org.eclipse.emf.common.util.EList signals,
java.lang.String name,
org.eclipse.emf.common.util.EList args)
Find a matching signal in the specified list. |
static org.eclipse.emf.ecore.EClassifier |
getOCLCollectionType(org.eclipse.emf.ecore.EClassifier type,
boolean isOrdered,
boolean isUnique)
Obtains the appropriate OCL collection type for an EClassifier ,
according to the collection's orderedness and uniqueness. |
static org.eclipse.emf.ecore.EClassifier |
getOCLType(org.eclipse.emf.ecore.EClassifier type)
Obtains the appropriate OCL type for an EClassifier , if it
corresponds to an OCL primitive type. |
static org.eclipse.emf.ecore.EClassifier |
getOCLType(org.eclipse.emf.ecore.ETypedElement typedElement)
Obtains the appropriate OCL type for an Ecore typed element, according to its type, multiplicity, orderedness, and uniqueness. |
static org.eclipse.emf.common.util.EList |
getOperations(org.eclipse.emf.ecore.EClassifier owner)
Obtains all of the OCL operations applicable to the specified owner type. |
static org.eclipse.emf.common.util.EList |
getProperties(org.eclipse.emf.ecore.EClassifier owner)
|
static int |
getRelationship(org.eclipse.emf.ecore.EClassifier type1,
org.eclipse.emf.ecore.EClassifier type2)
Computes the relationship between two types. |
static org.eclipse.emf.ecore.EClassifier |
getResultType(org.eclipse.emf.ecore.EClassifier owner,
org.eclipse.emf.ecore.EOperation oper)
|
static boolean |
isMany(org.eclipse.emf.ecore.ETypedElement typedElement)
Custom is-many determination to assume that XSD unspecified multiplicities are many. |
static void |
resolveAdditionalFeatures(org.eclipse.emf.ecore.EClassifier owner,
Environment env)
|
static org.eclipse.emf.ecore.EOperation |
resolveGenericSignature(org.eclipse.emf.ecore.EClassifier owner,
org.eclipse.emf.ecore.EOperation oper)
|
static org.eclipse.emf.ecore.EClassifier |
resolveType(Environment env,
org.eclipse.emf.ecore.EClassifier type)
Resolves the specified type against the model-based types defined by the specified environment's type resolver, for consistency with the environment (especially for persistence). |
static boolean |
type1AsType2(org.eclipse.emf.ecore.EClassifier type1,
org.eclipse.emf.ecore.EClassifier type2)
|
static int |
typeCompare(org.eclipse.emf.ecore.EClassifier type1,
org.eclipse.emf.ecore.EClassifier type2)
Compare 2 types. |
static void |
undefineAdditionalFeatures(org.eclipse.emf.ecore.EClassifier owner)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static org.eclipse.emf.ecore.EOperation findOperationMatching(org.eclipse.emf.ecore.EClassifier owner, java.lang.String name, org.eclipse.emf.common.util.EList args)
owner
- EClassifier owning operationsname
- name of operationargs
- list of arguments to match against the operation signature
null
if not foundpublic static org.eclipse.emf.ecore.EClass findSignalMatching(org.eclipse.emf.ecore.EClassifier receiver, org.eclipse.emf.common.util.EList signals, java.lang.String name, org.eclipse.emf.common.util.EList args)
receiver
- the type that receives the signalsignals
- the signals to searchname
- name of signal to findargs
- list of arguments to match against the signal signature
null
if not foundpublic static org.eclipse.emf.common.util.EList getOperations(org.eclipse.emf.ecore.EClassifier owner)
owner
- the operation owner type
public static org.eclipse.emf.common.util.EList getProperties(org.eclipse.emf.ecore.EClassifier owner)
public static org.eclipse.emf.ecore.EOperation resolveGenericSignature(org.eclipse.emf.ecore.EClassifier owner, org.eclipse.emf.ecore.EOperation oper)
public static org.eclipse.emf.ecore.EClassifier getResultType(org.eclipse.emf.ecore.EClassifier owner, org.eclipse.emf.ecore.EOperation oper)
public static boolean type1AsType2(org.eclipse.emf.ecore.EClassifier type1, org.eclipse.emf.ecore.EClassifier type2) throws SemanticException
SemanticException
public static int typeCompare(org.eclipse.emf.ecore.EClassifier type1, org.eclipse.emf.ecore.EClassifier type2)
type1
- -
EClassifiertype2
- -
EClassifier
public static org.eclipse.emf.ecore.EClassifier commonSuperType(org.eclipse.emf.ecore.EClassifier type1, org.eclipse.emf.ecore.EClassifier type2) throws SemanticException
type1
- type2
-
SemanticException
public static int getRelationship(org.eclipse.emf.ecore.EClassifier type1, org.eclipse.emf.ecore.EClassifier type2)
type1
- a typetype2
- another type
#UNRELATED_TYPE
, #STRICT_SUBTYPE
,
#STRICT_SUPERTYPE
, or #SAME_TYPE
according to the
relationship between the typespublic static org.eclipse.emf.ecore.EClassifier getOCLType(org.eclipse.emf.ecore.ETypedElement typedElement)
typedElement
- the ECore typed element to get the OCL type for
TypeUtil.getOCLType(EClassifier)
,
TypeUtil.getOCLCollectionType(EClassifier, boolean, boolean)
public static org.eclipse.emf.ecore.EClassifier getOCLType(org.eclipse.emf.ecore.EClassifier type)
EClassifier
, if it
corresponds to an OCL primitive type.
type
- the type to convert to an OCL type
public static org.eclipse.emf.ecore.EClassifier getOCLCollectionType(org.eclipse.emf.ecore.EClassifier type, boolean isOrdered, boolean isUnique)
EClassifier
,
according to the collection's orderedness and uniqueness. The mapping is
as follows:
Note that the collection's element type
is mapped to an
OCL primitive type where possible.
type
- the type to get the corresponding OCL collection type forisOrdered
- whether the OCL type should be orderedisUnique
- whether the OCL type should be unique
TypeUtil.getOCLType(EClassifier)
public static boolean isMany(org.eclipse.emf.ecore.ETypedElement typedElement)
typedElement
- a typed element
public static org.eclipse.emf.ecore.EClassifier resolveType(Environment env, org.eclipse.emf.ecore.EClassifier type)
env
- the parser environmenttype
- the type to resolve
public static org.eclipse.emf.ecore.EStructuralFeature defineProperty(org.eclipse.emf.ecore.EClassifier owner, Variable variable)
public static org.eclipse.emf.ecore.EOperation defineOperation(org.eclipse.emf.ecore.EClassifier owner, java.lang.String name, org.eclipse.emf.common.util.EList params, org.eclipse.emf.ecore.EClassifier type)
public static void undefineAdditionalFeatures(org.eclipse.emf.ecore.EClassifier owner)
public static void resolveAdditionalFeatures(org.eclipse.emf.ecore.EClassifier owner, Environment env)
|
Copyright 2002, 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |