public class OCLQueryDelegate
extends java.lang.Object
implements org.eclipse.emf.ecore.util.QueryDelegate
OCLQueryDelegateFactory| Modifier and Type | Field and Description |
|---|---|
protected OCLDelegateDomain |
delegateDomain |
protected java.lang.String |
expression |
protected EInvocationContext |
parserContext |
| Constructor and Description |
|---|
OCLQueryDelegate(OCLDelegateDomain delegateDomain,
org.eclipse.emf.ecore.EClassifier context,
java.util.Map<java.lang.String,org.eclipse.emf.ecore.EClassifier> parameters,
java.lang.String expression)
Initializes me with my domain, context, variables, and expression.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
evaluate(Query query,
java.lang.Object target) |
java.lang.Object |
execute(java.lang.Object target,
java.util.Map<java.lang.String,?> arguments)
Executes the query for the specified target object.
|
void |
prepare()
Prepares the query wrapping any exceptions as InvocationTargetException.
|
java.lang.String |
toString() |
@NonNull protected OCLDelegateDomain delegateDomain
@NonNull protected final EInvocationContext parserContext
@NonNull protected final java.lang.String expression
public OCLQueryDelegate(@NonNull
OCLDelegateDomain delegateDomain,
@NonNull
org.eclipse.emf.ecore.EClassifier context,
@Nullable
java.util.Map<java.lang.String,org.eclipse.emf.ecore.EClassifier> parameters,
@NonNull
java.lang.String expression)
delegateDomain - my domaincontext - my contextparameters - name and types of variables used in my expressionexpression - the expression that I handleParserException - if the expression is invalid@Nullable
protected java.lang.Object evaluate(@NonNull
Query query,
@Nullable
java.lang.Object target)
public java.lang.Object execute(@Nullable
java.lang.Object target,
java.util.Map<java.lang.String,?> arguments)
throws java.lang.reflect.InvocationTargetException
execute in interface org.eclipse.emf.ecore.util.QueryDelegatetarget - the object on which to execute the query; this must be an
instance of the context with which the delegate was createdarguments - a map of variable names to values; these must correspond to
the variables with which the delegate was createdjava.lang.reflect.InvocationTargetException - in case of failure to prepare or execute the query, usually
because of an exceptionpublic void prepare()
throws java.lang.reflect.InvocationTargetException
prepare in interface org.eclipse.emf.ecore.util.QueryDelegatejava.lang.reflect.InvocationTargetException - wrapping any parser, io exceptionspublic java.lang.String toString()
toString in class java.lang.Object