org.nakedobjects.metamodel.facets.object.value
Class ValueFacetFactory
java.lang.Object
org.nakedobjects.metamodel.facets.FacetFactoryAbstract
org.nakedobjects.metamodel.java5.AnnotationBasedFacetFactoryAbstract
org.nakedobjects.metamodel.facets.object.value.ValueFacetFactory
- All Implemented Interfaces:
- NakedObjectConfigurationAware, FacetFactory, AnnotationBasedFacetFactory, RuntimeContextAware, SpecificationLoaderAware
public class ValueFacetFactory
- extends AnnotationBasedFacetFactoryAbstract
- implements NakedObjectConfigurationAware, RuntimeContextAware
Processes the Value annotation.
As a result, will always install the following facets:
-
TitleFacet - based on the title() method if present, otherwise uses
toString()
-
IconFacet - based on the iconName() method if present, otherwise derived from the
class name
In addition, the following facets may be installed:
-
ParseableFacet - if a Parser has been specified explicitly in the annotation (or is
picked up through an external configuration file)
-
EncodableFacet - if an EncoderDecoder has been specified explicitly in the annotation
(or is picked up through an external configuration file)
-
ImmutableFacet - if specified explicitly in the annotation
-
EqualByContentFacet - if specified explicitly in the annotation
Note that AggregatedFacet is not installed.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueFacetFactory
public ValueFacetFactory()
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.
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.