org.eclipse.ocl.examples.emf.validation.validity.utilities
Class ComposedEValidator
java.lang.Object
org.eclipse.ocl.examples.emf.validation.validity.utilities.ComposedEValidator
- All Implemented Interfaces:
- org.eclipse.emf.ecore.EValidator
public class ComposedEValidator
- extends java.lang.Object
- implements org.eclipse.emf.ecore.EValidator
A ComposedEValidator supports validation over a list of EValidators, validation terminating prematurely at
the first child EValidator that returns false.
A ComposedEValidator may be installed to displace an EValidator.Registry.INSTANCE entry. This in itself is
harmless but since the EValidator.Registry.INSTANCE is global, any additional EValidators added to the
ComposedEValidator should restrict their activities to ResourceSets in which they are required.
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.EValidator |
org.eclipse.emf.ecore.EValidator.Descriptor, org.eclipse.emf.ecore.EValidator.PatternMatcher, org.eclipse.emf.ecore.EValidator.Registry, org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider, org.eclipse.emf.ecore.EValidator.ValidationDelegate |
Field Summary |
protected java.util.List<org.eclipse.emf.ecore.EValidator> |
eValidators
|
Fields inherited from interface org.eclipse.emf.ecore.EValidator |
MARKER, RELATED_URIS_ATTRIBUTE, URI_ATTRIBUTE |
Method Summary |
void |
addChild(org.eclipse.emf.ecore.EValidator eValidator)
Add a child EValidator, suppressing null and duplicates. |
java.util.List<org.eclipse.emf.ecore.EValidator> |
getChildren()
|
static ComposedEValidator |
install(org.eclipse.emf.ecore.EPackage ePackage)
Install a ComposedEValidator for ePackage displacing the prevailing EValidator.Registry.INSTANCE
entry and adding it as the first ComposedEValidator child. |
boolean |
removeChild(org.eclipse.emf.ecore.EValidator eValidator)
|
boolean |
validate(org.eclipse.emf.ecore.EClass eClass,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
boolean |
validate(org.eclipse.emf.ecore.EDataType eDataType,
java.lang.Object value,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
boolean |
validate(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
eValidators
@NonNull
protected final java.util.List<org.eclipse.emf.ecore.EValidator> eValidators
ComposedEValidator
public ComposedEValidator(@Nullable
org.eclipse.emf.ecore.EValidator eValidator)
install
@NonNull
public static ComposedEValidator install(@NonNull
org.eclipse.emf.ecore.EPackage ePackage)
- Install a ComposedEValidator for ePackage displacing the prevailing EValidator.Registry.INSTANCE
entry and adding it as the first ComposedEValidator child.
addChild
public void addChild(@Nullable
org.eclipse.emf.ecore.EValidator eValidator)
- Add a child EValidator, suppressing null and duplicates.
getChildren
@NonNull
public java.util.List<org.eclipse.emf.ecore.EValidator> getChildren()
removeChild
public boolean removeChild(@Nullable
org.eclipse.emf.ecore.EValidator eValidator)
validate
public boolean validate(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
- Specified by:
validate
in interface org.eclipse.emf.ecore.EValidator
validate
public boolean validate(org.eclipse.emf.ecore.EClass eClass,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
- Specified by:
validate
in interface org.eclipse.emf.ecore.EValidator
validate
public boolean validate(org.eclipse.emf.ecore.EDataType eDataType,
java.lang.Object value,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
- Specified by:
validate
in interface org.eclipse.emf.ecore.EValidator