public class ValidationBehavior extends AbstractDelegatedBehavior<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EValidator.ValidationDelegate.Registry,ValidationDelegate.Factory>
Modifier and Type | Class and Description |
---|---|
protected static class |
ValidationBehavior.InvariantCacheAdapter
Caches the OCL invariants of an
EClassifier . |
AbstractDelegatedBehavior.ExpressionCacheAdapter
Modifier and Type | Field and Description |
---|---|
static ValidationBehavior |
INSTANCE |
static java.lang.String |
NAME |
NO_OCL_DEFINITION
Constructor and Description |
---|
ValidationBehavior() |
Modifier and Type | Method and Description |
---|---|
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 . |
OCLExpression |
getCachedOCLExpression(org.eclipse.emf.ecore.EClassifier cls,
java.lang.String constraintName)
Looks for an
OCLInvariantCacheAdapter attached to cls . |
ValidationDelegate.Factory |
getDefaultFactory() |
org.eclipse.emf.ecore.EValidator.ValidationDelegate.Registry |
getDefaultRegistry() |
org.eclipse.emf.ecore.EPackage |
getEPackage(org.eclipse.emf.ecore.EClassifier eClassifier) |
ValidationDelegate.Factory |
getFactory(DelegateDomain delegateDomain,
org.eclipse.emf.ecore.EClassifier eClassifier) |
java.lang.Class<ValidationDelegate.Factory> |
getFactoryClass() |
OCLExpression |
getInvariant(org.eclipse.emf.ecore.EClassifier cls,
java.lang.String constraintName,
OCL ocl) |
java.lang.String |
getName() |
java.lang.Class<ValidationDelegate.Factory.Registry> |
getRegistryClass() |
getDelegatedBehaviors, getDelegateDomains, getFactories, getFactory, isNoOCLDefinition, setDelegates, toString
public static final ValidationBehavior INSTANCE
public static final java.lang.String NAME
public ValidationDelegate.Factory getDefaultFactory()
public org.eclipse.emf.ecore.EValidator.ValidationDelegate.Registry getDefaultRegistry()
public org.eclipse.emf.ecore.EPackage getEPackage(org.eclipse.emf.ecore.EClassifier eClassifier)
public ValidationDelegate.Factory getFactory(DelegateDomain delegateDomain, org.eclipse.emf.ecore.EClassifier eClassifier)
getFactory
in class AbstractDelegatedBehavior<org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EValidator.ValidationDelegate.Registry,ValidationDelegate.Factory>
public java.lang.Class<ValidationDelegate.Factory> getFactoryClass()
public void cacheOCLExpression(org.eclipse.emf.ecore.EClassifier cls, java.lang.String constraintName, OCLExpression e)
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.e
- if null
, the respective cache entry for constraintName
is removed.public OCLExpression getCachedOCLExpression(org.eclipse.emf.ecore.EClassifier cls, java.lang.String constraintName)
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.public OCLExpression getInvariant(org.eclipse.emf.ecore.EClassifier cls, java.lang.String constraintName, OCL ocl)
public java.lang.String getName()
public java.lang.Class<ValidationDelegate.Factory.Registry> getRegistryClass()