org.nakedobjects.metamodel.facets.properties.validate
Class PropertyValidateDefaultFacetFactory
java.lang.Object
org.nakedobjects.metamodel.facets.FacetFactoryAbstract
org.nakedobjects.metamodel.facets.properties.validate.PropertyValidateDefaultFacetFactory
- All Implemented Interfaces:
- FacetFactory, SpecificationLoaderAware
public class PropertyValidateDefaultFacetFactory
- extends FacetFactoryAbstract
Simply installs a PropertyValidateFacet onto all properties.
The idea is that this FacetFactory is included early on in the FacetProcessor, but
other PropertyValidateFacet implementations will potentially replace these where the property is
annotated or otherwise provides a validation mechanism.
|
Method Summary |
boolean |
process(java.lang.reflect.Method method,
MethodRemover methodRemover,
FacetHolder holder)
Process the method, and return the correctly setup annotation if present. |
boolean |
processParams(java.lang.reflect.Method method,
int paramNum,
FacetHolder holder)
Process the parameters of the method, and return the correctly setup annotation if present. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyValidateDefaultFacetFactory
public PropertyValidateDefaultFacetFactory()
process
public boolean process(java.lang.reflect.Method method,
MethodRemover methodRemover,
FacetHolder holder)
- Description copied from interface:
FacetFactory
- Process the method, and return the correctly setup annotation if present.
- Specified by:
process in interface FacetFactory- Overrides:
process in class FacetFactoryAbstract
- Parameters:
method - - method representing the feature being processed (getter for property or collection, or
action)methodRemover - - allow any methods of the class to be removedholder - - to attach the facets to
- Returns:
- true if any facets were added and therefore should be removed, false
otherwise. Returning true will cause the method to be removed
processParams
public boolean processParams(java.lang.reflect.Method method,
int paramNum,
FacetHolder holder)
- Description copied from interface:
FacetFactory
- Process the parameters of the method, and return the correctly setup annotation if present.
- Specified by:
processParams in interface FacetFactory- Overrides:
processParams in class FacetFactoryAbstract
- Parameters:
method - - method representing the feature being processed (getter for property or collection, or
action)paramNum - - 0-based index to the parameter to be processed.holder - - to attach the facets to
- Returns:
- true if any facets were added, false otherwise.
Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.