org.nakedobjects.metamodel.facets
Interface FacetFactory

All Known Subinterfaces:
InterfaceBasedFacetFactory, MethodFilteringFacetFactory, MethodPrefixBasedFacetFactory, PropertyOrCollectionIdentifyingFacetFactory
All Known Implementing Classes:
ActionMethodsFacetFactory, ActionOrderAnnotationFacetFactory, AggregatedAnnotationFacetFactory, AggregatedIfCollectionFacetFactory, AnnotationBasedFacetFactoryAbstract, BigDecimalValueTypeFacetFactory, BigIntegerValueTypeFacetFactory, BooleanPrimitiveValueTypeFacetFactory, BooleanWrapperValueTypeFacetFactory, BoundedAnnotationFacetFactory, BoundedMarkerInterfaceFacetFactory, BytePrimitiveValueTypeFacetFactory, ByteWrapperValueTypeFacetFactory, CharPrimitiveValueTypeFacetFactory, CharWrapperValueTypeFacetFactory, CollectionFacetFactory, CollectionFieldMethodsFacetFactory, ColorValueTypeFacetFactory, CreatedCallbackFacetFactory, DateTimeValueTypeFacetFactory, DateValueTypeFacetFactory, DebugAnnotationFacetFactory, DefaultedAnnotationFacetFactory, DeleteCallbackFacetFactory, DescribedAsAnnotationFacetFactory, DirtyMethodsFacetFactory, DisabledAnnotationFacetFactory, DoublePrimitiveValueTypeFacetFactory, DoubleWrapperValueTypeFacetFactory, EncodableAnnotationFacetFactory, ExecutedAnnotationFacetFactory, ExecutedViaNamingConventionFacetFactory, ExplorationAnnotationFacetFactory, FacetFactoryAbstract, FacetsAnnotationFacetFactory, FallbackFacetFactory, FieldOrderAnnotationFacetFactory, FloatPrimitiveValueTypeFacetFactory, FloatWrapperValueTypeFacetFactory, HiddenAnnotationFacetFactory, IconMethodFacetFactory, ImageValueTypeFacetFactory, ImmutableAnnotationFacetFactory, ImmutableMarkerInterfacesFacetFactory, IntPrimitiveValueTypeFacetFactory, IntWrapperValueTypeFacetFactory, IteratorFilteringFacetFactory, JavaAwtImageValueTypeFacetFactory, JavaSqlDateValueTypeFacetFactory, JavaSqlTimeValueTypeFacetFactory, JavaUtilDateValueTypeFacetFactory, LoadCallbackFacetFactory, LongPrimitiveValueTypeFacetFactory, LongWrapperValueTypeFacetFactory, MandatoryDefaultFacetFactory, MaskAnnotationFacetFactory, MaxLengthAnnotationFacetFactory, MemberOrderAnnotationFacetFactory, MethodPrefixBasedFacetFactoryAbstract, MoneyValueTypeFacetFactory, MultiLineAnnotationFacetFactory, MustSatisfySpecificationFacetFactory, NamedAnnotationFacetFactory, NotPersistableAnnotationFacetFactory, NotPersistableMarkerInterfacesFacetFactory, NotPersistedAnnotationFacetFactory, ObjectValidPropertiesFacetFactory, OptionalAnnotationFacetFactory, ParseableFacetFactory, PasswordValueTypeFacetFactory, PercentageValueTypeFacetFactory, PersistCallbackFacetFactory, PluralAnnotationFacetFactory, PluralMethodFacetFactory, PropertyMethodsFacetFactory, PropertyOrCollectionIdentifyingFacetFactoryAbstract, PropertyValidateDefaultFacetFactory, RegExAnnotationFacetFactory, RemoveCallbackFacetFactory, RemoveGetClassMethodFacetFactory, RemoveIgnoreAnnotationMethodsFacetFactory, RemoveInitMethodFacetFactory, RemoveJavaLangObjectMethodsFacetFactory, RemoveSetDomainObjectContainerMethodFacetFactory, RemoveStaticGettersAndSettersFacetFactory, RemoveSuperclassMethodsFacetFactory, SaveCallbackFacetFactory, ShortPrimitiveValueTypeFacetFactory, ShortWrapperValueTypeFacetFactory, SingularMethodFacetFactory, StringValueTypeFacetFactory, SyntheticMethodFilteringFacetFactory, TimeStampValueTypeFacetFactory, TimeValueTypeFacetFactory, TitleMethodFacetFactory, TypeOfAnnotationFacetFactory, TypicalLengthAnnotationFacetFactory, TypicalLengthDerivedFromTypeFacetFactory, UpdateCallbackFacetFactory, ValidateObjectViaValidateMethodFacetFactory, ValueFacetFactory, ValueUsingValueSemanticsProviderFacetFactory

public interface FacetFactory


Method Summary
 NakedObjectFeatureType[] getFeatureTypes()
          The feature types that this facet factory can create Facets for.
 boolean process(java.lang.Class<?> cls, 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.
 

Method Detail

getFeatureTypes

NakedObjectFeatureType[] getFeatureTypes()
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.


process

boolean process(java.lang.Class<?> cls,
                MethodRemover methodRemover,
                FacetHolder holder)
Process the class, and return the correctly setup annotation if present.

Parameters:
cls - - 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

boolean process(java.lang.reflect.Method method,
                MethodRemover methodRemover,
                FacetHolder holder)
Process the method, and return the correctly setup annotation if present.

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

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.

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.