public final class OCLUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PLUGIN_ID
The shared Ecore and UML binding plugin identification.
|
Modifier and Type | Method and Description |
---|---|
static org.eclipse.emf.common.util.Diagnostic |
checkForErrors(Environment<?,?,?,?,?,?,?,?,?,?,?,?> env)
Checks whether the specified environment's problem handler has any
diagnostics of error severity or worse and, if so, throws a semantic
exception encapsulating these diagnostics.
|
static org.eclipse.emf.common.util.Diagnostic |
checkForErrors(ProblemHandler problemHandler)
Checks whether the specified problem handler has any
diagnostics of error severity or worse and, if so, throws a semantic
exception encapsulating these diagnostics.
|
static org.eclipse.emf.common.util.Diagnostic |
checkForErrorsOrWarnings(Environment<?,?,?,?,?,?,?,?,?,?,?,?> env)
Checks whether the specified environment's problem handler has any
diagnostics of warnings severity or worse and, if so, throws a semantic
exception encapsulating these diagnostics.
|
static org.eclipse.emf.common.util.Diagnostic |
checkForErrorsOrWarnings(ProblemHandler problemHandler)
Checks whether the specified problem handler has any
diagnostics of warning severity or worse and, if so, throws a semantic
exception encapsulating these diagnostics.
|
static <T> T |
getAdapter(Environment<?,?,?,?,?,?,?,?,?,?,?,?> env,
java.lang.Class<T> adapterType)
Obtains an adapter for the specified interface type.
|
static <T> T |
getAdapter(EnvironmentFactory<?,?,?,?,?,?,?,?,?,?,?,?> factory,
java.lang.Class<T> adapterType)
Obtains an adapter for the specified interface type.
|
static <T> T |
getAdapter(EvaluationEnvironment<?,?,?,?,?> env,
java.lang.Class<T> adapterType)
Obtains an adapter for the specified interface type, if the evaluation
environment is
Adaptable to it. |
static <C,CLS,E> org.eclipse.emf.common.util.Diagnostic |
getEvaluationProblems(Query<C,CLS,E> query)
Attempts to get evaluation problems available from the last evaluation of
the given query.
|
static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
getValidationEnvironment(java.lang.Object target,
java.util.Map<java.lang.Object,java.lang.Object> context)
Attempts to get an environment instance that is appropriate for introspection
of the specified validation target.
|
public static final java.lang.String PLUGIN_ID
public static <T> T getAdapter(Environment<?,?,?,?,?,?,?,?,?,?,?,?> env, java.lang.Class<T> adapterType)
BasicEnvironment
. In the case that the environment is not
intrinsically adaptable to this interface and an extrinsic adapter
is provided, multiple adaptations of the same environment will
always return the same adapter instanceCustomizable
. In the case that the environment is not
intrinsically adaptable to this interface it is forcibly adapted to
the BasicEnvironment
protocolProblemHandler
Environment.Lookup
T
- the requested adapter interfaceenv
- an environment to adaptadapterType
- the requested adapter interfacenull
if this environment does not adapt to itpublic static <T> T getAdapter(EnvironmentFactory<?,?,?,?,?,?,?,?,?,?,?,?> factory, java.lang.Class<T> adapterType)
EnvironmentFactory.Lookup
T
- the requested adapter interfacefactory
- an environment factory to adaptadapterType
- the requested adapter interfacenull
if this environment factory does not adapt to itpublic static <T> T getAdapter(EvaluationEnvironment<?,?,?,?,?> env, java.lang.Class<T> adapterType)
Adaptable
to it.T
- the requested adapter interfaceenv
- an evaluation environment to adaptadapterType
- the requested adapter interfacenull
if this evaluation environment does not adapt to itpublic static org.eclipse.emf.common.util.Diagnostic checkForErrors(Environment<?,?,?,?,?,?,?,?,?,?,?,?> env) throws SyntaxException, SemanticException
env
- an environment in which we have parsed some OCLSyntaxException
- if there are any errors in parsing the concrete
syntaxSemanticException
- if there are any errors in analyzing the
abstract syntaxcheckForErrors(ProblemHandler)
public static org.eclipse.emf.common.util.Diagnostic checkForErrors(ProblemHandler problemHandler) throws SyntaxException, SemanticException
problemHandler
- a problem handlerSyntaxException
- if there are any errors in parsing the concrete
syntaxSemanticException
- if there are any errors in analyzing the
abstract syntaxpublic static org.eclipse.emf.common.util.Diagnostic checkForErrorsOrWarnings(Environment<?,?,?,?,?,?,?,?,?,?,?,?> env) throws SyntaxException, SemanticException
env
- an environment in which we have parsed some OCLSyntaxException
- if there are any errors in parsing the concrete
syntaxSemanticException
- if there are any errors in analyzing the
abstract syntaxcheckForErrors(ProblemHandler)
public static org.eclipse.emf.common.util.Diagnostic checkForErrorsOrWarnings(ProblemHandler problemHandler) throws SyntaxException, SemanticException
problemHandler
- a problem handlerSyntaxException
- if there are any errors in parsing the concrete
syntaxSemanticException
- if there are any errors in analyzing the
abstract syntaxpublic static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> getValidationEnvironment(java.lang.Object target, java.util.Map<java.lang.Object,java.lang.Object> context)
target
- an object to be validated in an appropriate environmentcontext
- the current validation contextnull
if none can be foundEnvironment.Registry
public static <C,CLS,E> org.eclipse.emf.common.util.Diagnostic getEvaluationProblems(Query<C,CLS,E> query)
query
- a query to check for evaluation problemsnull
if no problems are available