org.eclipse.ocl.ecore.delegate
Class OCLQueryDelegateFactory
java.lang.Object
org.eclipse.ocl.ecore.delegate.AbstractOCLDelegateFactory
org.eclipse.ocl.ecore.delegate.OCLQueryDelegateFactory
- All Implemented Interfaces:
- org.eclipse.emf.ecore.util.QueryDelegate.Factory
- Direct Known Subclasses:
- OCLQueryDelegateFactory.Global
public class OCLQueryDelegateFactory
- extends AbstractOCLDelegateFactory
- implements org.eclipse.emf.ecore.util.QueryDelegate.Factory
Factory for OCL query delegates.
The factory may be obtained by:
QueryDelegate.Factory factory = QueryDelegate.Factory.Registry.INSTANCE
.getFactory(OCLDelegateDomain.OCL_DELEGATE_URI);
from which a query delegate may be created by:
QueryDelegate delegate = factory.createQueryDelegate(
classifier, // the context type
map-of-name-to-classifier, // the external variable names and types
string); // the OCL expression text
and (repeatedly) invoked by:
Object result = delegate.execute(
target, // the context instance
map-of-name-to-object); // the external variable bindings
- Since:
- 3.1
Nested Class Summary |
static class |
OCLQueryDelegateFactory.Global
The Global variant of the Factory delegates to a local ResourceSet factory if one
can be located at the QueryDelegate.Factory.Registry
by the DelegateResourceSetAdapter. |
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.util.QueryDelegate.Factory |
org.eclipse.emf.ecore.util.QueryDelegate.Factory.Descriptor, org.eclipse.emf.ecore.util.QueryDelegate.Factory.Registry |
Method Summary |
org.eclipse.emf.ecore.util.QueryDelegate |
createQueryDelegate(org.eclipse.emf.ecore.EClassifier context,
java.util.Map<java.lang.String,org.eclipse.emf.ecore.EClassifier> parameters,
java.lang.String expression)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OCLQueryDelegateFactory
@Deprecated
public OCLQueryDelegateFactory()
- Deprecated. Specify explicit delegateURI
- Construct a factory for an unknown delegate domain; often the global factory.
OCLQueryDelegateFactory
public OCLQueryDelegateFactory(java.lang.String delegateURI)
- Construct a factory for a known delegate domain.
- Parameters:
delegateDomain
- the delegate domain.- Since:
- 3.2
OCLQueryDelegateFactory
@Deprecated
public OCLQueryDelegateFactory(OCLDelegateDomain delegateDomain)
- Deprecated. Use String argument to avoid leak hazards
- Construct a factory for a known delegate domain.
- Parameters:
delegateDomain
- the delegate domain.
createQueryDelegate
public org.eclipse.emf.ecore.util.QueryDelegate createQueryDelegate(org.eclipse.emf.ecore.EClassifier context,
java.util.Map<java.lang.String,org.eclipse.emf.ecore.EClassifier> parameters,
java.lang.String expression)
- Specified by:
createQueryDelegate
in interface org.eclipse.emf.ecore.util.QueryDelegate.Factory