org.nakedobjects.metamodel.facets.object.defaults
Class DefaultedAnnotationFacetFactory
java.lang.Object
org.nakedobjects.metamodel.facets.FacetFactoryAbstract
org.nakedobjects.metamodel.java5.AnnotationBasedFacetFactoryAbstract
org.nakedobjects.metamodel.facets.object.defaults.DefaultedAnnotationFacetFactory
- All Implemented Interfaces:
- NakedObjectConfigurationAware, FacetFactory, AnnotationBasedFacetFactory, RuntimeContextAware, SpecificationLoaderAware
public class DefaultedAnnotationFacetFactory
- extends AnnotationBasedFacetFactoryAbstract
- implements NakedObjectConfigurationAware, RuntimeContextAware
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultedAnnotationFacetFactory
public DefaultedAnnotationFacetFactory()
process
public boolean process(java.lang.Class<?> cls,
MethodRemover methodRemover,
FacetHolder holder)
- Description copied from interface:
FacetFactory
- Process the class, and return the correctly setup annotation if present.
- Specified by:
process in interface FacetFactory- Overrides:
process in class FacetFactoryAbstract
- Parameters:
cls - - class being processedmethodRemover - - allow any methods of the class to be removedholder - - to attach the facets to
- Returns:
- true if any facets were added, false otherwise.
process
public boolean process(java.lang.reflect.Method method,
MethodRemover methodRemover,
FacetHolder holder)
- If there is a
DefaultedFacet on the properties return type, then installs a
PropertyDefaultFacet for the property with the same default.
- 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)
- If there is a
DefaultedFacet on any of the action's parameter types, then installs a
ActionDefaultsFacet for the action.
- 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.
getNakedObjectConfiguration
public NakedObjectConfiguration getNakedObjectConfiguration()
setNakedObjectConfiguration
public void setNakedObjectConfiguration(NakedObjectConfiguration configuration)
- Description copied from interface:
NakedObjectConfigurationAware
- Inject the
NakedObjectConfiguration into the component.
- Specified by:
setNakedObjectConfiguration in interface NakedObjectConfigurationAware
setRuntimeContext
public void setRuntimeContext(RuntimeContext runtimeContext)
- Specified by:
setRuntimeContext in interface RuntimeContextAware
Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.