public class ValidationBehavior extends AbstractDelegatedBehavior<EClassifier,EValidator.ValidationDelegate.Registry,ValidationDelegate.Factory>
Modifier and Type | Field and Description |
---|---|
static ValidationBehavior |
INSTANCE |
static String |
NAME |
NO_OCL_DEFINITION
Constructor and Description |
---|
ValidationBehavior() |
Modifier and Type | Method and Description |
---|---|
void |
cacheOCLExpression(EClassifier cls,
String constraintName,
OCLExpression e)
Creates an
InvariantCacheAdapter for expression e and adds
it to n 's adapter list so that getCachedOCLExpression(EClassifier, String)
will return e when called for n . |
OCLExpression |
getCachedOCLExpression(EClassifier cls,
String constraintName)
Looks for an
InvariantCacheAdapter attached to cls . |
ValidationDelegate.Factory |
getDefaultFactory() |
EValidator.ValidationDelegate.Registry |
getDefaultRegistry() |
EPackage |
getEPackage(EClassifier eClassifier) |
ValidationDelegate.Factory |
getFactory(DelegateDomain delegateDomain,
EClassifier eClassifier) |
Class<ValidationDelegate.Factory> |
getFactoryClass() |
OCLExpression |
getInvariant(EClassifier cls,
String constraintName,
OCL ocl) |
String |
getName() |
Class<ValidationDelegate.Factory.Registry> |
getRegistryClass() |
getDelegatedBehaviors, getDelegateDomains, getFactories, getFactory, isNoOCLDefinition, setDelegates, toString
public static final ValidationBehavior INSTANCE
public static final String NAME
public ValidationDelegate.Factory getDefaultFactory()
public EValidator.ValidationDelegate.Registry getDefaultRegistry()
public EPackage getEPackage(EClassifier eClassifier)
public ValidationDelegate.Factory getFactory(DelegateDomain delegateDomain, EClassifier eClassifier)
public Class<ValidationDelegate.Factory> getFactoryClass()
public void cacheOCLExpression(EClassifier cls, String constraintName, OCLExpression e)
InvariantCacheAdapter
for expression e
and adds
it to n
's adapter list so that getCachedOCLExpression(EClassifier, String)
will return e
when called for n
. To achieve this, any other
InvariantCacheAdapter
in n
's adapter list is removed.e
- if null
, the respective cache entry for constraintName
is removed.public OCLExpression getCachedOCLExpression(EClassifier cls, String constraintName)
InvariantCacheAdapter
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(EClassifier cls, String constraintName, OCL ocl)
public String getName()
public Class<ValidationDelegate.Factory.Registry> getRegistryClass()
Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.