org.eclipse.ocl.ecore.delegate
Class ValidationBehavior
java.lang.Object
org.eclipse.ocl.ecore.delegate.AbstractDelegatedBehavior<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EValidator.ValidationDelegate.Registry,ValidationDelegate.Factory>
org.eclipse.ocl.ecore.delegate.ValidationBehavior
- All Implemented Interfaces:
- DelegatedBehavior<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EValidator.ValidationDelegate.Registry,ValidationDelegate.Factory>
public class ValidationBehavior
- extends AbstractDelegatedBehavior<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EValidator.ValidationDelegate.Registry,ValidationDelegate.Factory>
- Since:
- 3.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
INSTANCE
public static final ValidationBehavior INSTANCE
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
ValidationBehavior
public ValidationBehavior()
getDefaultFactory
public ValidationDelegate.Factory getDefaultFactory()
getDefaultRegistry
public org.eclipse.emf.ecore.EValidator.ValidationDelegate.Registry getDefaultRegistry()
getEPackage
public org.eclipse.emf.ecore.EPackage getEPackage(org.eclipse.emf.ecore.EClassifier eClassifier)
getFactory
public ValidationDelegate.Factory getFactory(DelegateDomain delegateDomain,
org.eclipse.emf.ecore.EClassifier eClassifier)
- Specified by:
getFactory
in class AbstractDelegatedBehavior<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EValidator.ValidationDelegate.Registry,ValidationDelegate.Factory>
getFactoryClass
public java.lang.Class<ValidationDelegate.Factory> getFactoryClass()
cacheOCLExpression
public void cacheOCLExpression(org.eclipse.emf.ecore.EClassifier cls,
java.lang.String constraintName,
OCLExpression e)
- Creates an
OCLInvariantCacheAdapter
for expression e
and adds
it to n
's adapter list so that #getCachedOCLExpression(Notifier)
will return e
when called for n
. To achieve this, any other
OCLInvariantCacheAdapter
in n
's adapter list is removed.
- Parameters:
e
- if null
, the respective cache entry for constraintName
is removed.- Since:
- 3.1
getCachedOCLExpression
public OCLExpression getCachedOCLExpression(org.eclipse.emf.ecore.EClassifier cls,
java.lang.String constraintName)
- Looks for an
OCLInvariantCacheAdapter
attached to cls
.
If such an adapter is found, a cached expression for constraintName
is returned.
The cached expression may be a reserved expression indicating that no OCL expression exists
and that an unsuccessful attempt to obtain one has been made before.
AbstractDelegatedBehavior.isNoOCLDefinition(OCLExpression)
should be used to check for the reserved expression.
null is returned if no cached expression is available.
- Since:
- 3.1
getInvariant
public OCLExpression getInvariant(org.eclipse.emf.ecore.EClassifier cls,
java.lang.String constraintName,
OCL ocl)
- Since:
- 3.1
getName
public java.lang.String getName()
getRegistryClass
public java.lang.Class<ValidationDelegate.Factory.Registry> getRegistryClass()