org.eclipse.emf.validation.service
Class ConstraintFactory
java.lang.Object
org.eclipse.emf.validation.service.ConstraintFactory
-
public abstract class ConstraintFactory
- extends
Object
A constraint factory creates constraint implementations from descriptors.
The intent is to support registration of custom factory implementations,
but currently, the only implementation is the XmlConstraintFactory.
This class is not intended to be used outside of the validation framework.
|
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
ConstraintFactory
protected ConstraintFactory()
- Initializes me.
getInstance
public static
ConstraintFactory getInstance()
- Obtains the currently registered factory instance.
-
-
Returns:
- the constraint factory instance
newConstraint
@Deprecated
public final
IModelConstraint newConstraint(
IXmlConstraintDescriptor descriptor)
-
Deprecated. Use the
newConstraint(IConstraintDescriptor)
method, instead
- Creates the constraint represented by the specified
descriptor. This method never fails to return a valid
constraint implementation (though it may be a proxy for a disabled
constraint if the descriptor is invalid). This method
delegates to the superclass implementation of the
createConstraint(org.eclipse.emf.validation.xml.IXmlConstraintDescriptor) method.
-
-
Parameters:
-
descriptor - the constraint descriptor
-
Returns:
- the corresponding constraint implementation
-
See Also:
-
createConstraint(org.eclipse.emf.validation.xml.IXmlConstraintDescriptor)
createConstraint
@Deprecated
protected abstract
IModelConstraint createConstraint(
IXmlConstraintDescriptor descriptor)
-
Deprecated. Use the
createConstraint(IConstraintDescriptor)
method, instead
- Implemented by subclasses to do the hard work of creating a constraint.
-
-
Parameters:
-
descriptor - a descriptor of the constraint to be created
-
Returns:
- the appropriate implementation of the constraint
newConstraint
public final
IModelConstraint newConstraint(
IConstraintDescriptor descriptor)
- Creates the constraint represented by the specified
descriptor. This method never fails to return a valid
constraint implementation (though it may be a proxy for a disabled
constraint if the descriptor is invalid). This method
delegates to the superclass implementation of the
createConstraint(org.eclipse.emf.validation.xml.IXmlConstraintDescriptor) method.
-
-
Parameters:
-
descriptor - the constraint descriptor
-
Returns:
- the corresponding constraint implementation
-
Since:
- 1.1
-
See Also:
-
createConstraint(org.eclipse.emf.validation.xml.IXmlConstraintDescriptor)
createConstraint
protected abstract
IModelConstraint createConstraint(
IConstraintDescriptor descriptor)
- Implemented by subclasses to do the hard work of creating a constraint.
-
-
Parameters:
-
descriptor - a descriptor of the constraint to be created
-
Returns:
- the appropriate implementation of the constraint
-
Since:
- 1.1