org.nakedobjects.metamodel.facets
Class FacetFactoryAbstract

java.lang.Object
  extended by org.nakedobjects.metamodel.facets.FacetFactoryAbstract
All Implemented Interfaces:
FacetFactory, SpecificationLoaderAware
Direct Known Subclasses:
AggregatedIfCollectionFacetFactory, AnnotationBasedFacetFactoryAbstract, BoundedMarkerInterfaceFacetFactory, CollectionFacetFactory, ExecutedViaNamingConventionFacetFactory, FallbackFacetFactory, ImmutableMarkerInterfacesFacetFactory, IteratorFilteringFacetFactory, MandatoryDefaultFacetFactory, MethodPrefixBasedFacetFactoryAbstract, NotPersistableMarkerInterfacesFacetFactory, ObjectValidPropertiesFacetFactory, PropertyValidateDefaultFacetFactory, RemoveGetClassMethodFacetFactory, RemoveInitMethodFacetFactory, RemoveJavaLangObjectMethodsFacetFactory, RemoveSetDomainObjectContainerMethodFacetFactory, RemoveStaticGettersAndSettersFacetFactory, RemoveSuperclassMethodsFacetFactory, SyntheticMethodFilteringFacetFactory, TypicalLengthDerivedFromTypeFacetFactory, ValueUsingValueSemanticsProviderFacetFactory

public abstract class FacetFactoryAbstract
extends java.lang.Object
implements FacetFactory, SpecificationLoaderAware


Constructor Summary
FacetFactoryAbstract(NakedObjectFeatureType[] featureTypes)
           
 
Method Summary
 NakedObjectFeatureType[] getFeatureTypes()
          The feature types that this facet factory can create Facets for.
protected  SpecificationLoader getSpecificationLoader()
           
 boolean process(java.lang.Class<?> clazz, MethodRemover methodRemover, FacetHolder holder)
          Process the class, and return the correctly setup annotation if present.
 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.
 void setSpecificationLoader(SpecificationLoader specificationLoader)
          Injected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacetFactoryAbstract

public FacetFactoryAbstract(NakedObjectFeatureType[] featureTypes)
Method Detail

getFeatureTypes

public NakedObjectFeatureType[] getFeatureTypes()
Description copied from interface: FacetFactory
The feature types that this facet factory can create Facets for.

Used by the Java5 Reflector's ProgrammingModel to reduce the number of factorys that are queried when building up the meta-model.

Specified by:
getFeatureTypes in interface FacetFactory

process

public boolean process(java.lang.Class<?> clazz,
                       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
Parameters:
clazz - - class being processed
methodRemover - - allow any methods of the class to be removed
holder - - 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)
Description copied from interface: FacetFactory
Process the method, and return the correctly setup annotation if present.

Specified by:
process in interface FacetFactory
Parameters:
method - - method representing the feature being processed (getter for property or collection, or action)
methodRemover - - allow any methods of the class to be removed
holder - - 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
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.

getSpecificationLoader

protected SpecificationLoader getSpecificationLoader()

setSpecificationLoader

public void setSpecificationLoader(SpecificationLoader specificationLoader)
Injected

Specified by:
setSpecificationLoader in interface SpecificationLoaderAware


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.