org.nakedobjects.metamodel.facets
Interface PropertyOrCollectionIdentifyingFacetFactory

All Superinterfaces:
FacetFactory
All Known Implementing Classes:
CollectionFieldMethodsFacetFactory, PropertyMethodsFacetFactory, PropertyOrCollectionIdentifyingFacetFactoryAbstract

public interface PropertyOrCollectionIdentifyingFacetFactory
extends FacetFactory

A FacetFactory implementation that is able to identify a property or collection.

For example, a getter method is most commonly used to represent either a property (value or reference) or a collection, with the return type indicating which.

Used by the Java5 Reflector's ProgrammingModel to determine which facet factories to ask whether a Method represents a property or a collection.


Method Summary
 void findAndRemoveCollectionAccessors(MethodRemover methodRemover, java.util.List<java.lang.reflect.Method> methodListToAppendTo)
          Use the provided MethodRemover to remove all collection accessors, and append them to the supplied methodList.
 void findAndRemovePropertyAccessors(MethodRemover methodRemover, java.util.List<java.lang.reflect.Method> methodListToAppendTo)
          Use the provided MethodRemover to remove all reference property accessors, and append them to the supplied methodList.
 boolean isCollectionAccessor(java.lang.reflect.Method method)
          Whether (this facet is able to determine that) the supplied Method represents a collection.
 boolean isPropertyAccessor(java.lang.reflect.Method method)
          Whether (this facet is able to determine that) the supplied Method represents either a value property or a reference property.
 boolean isPropertyOrCollectionAccessorCandidate(java.lang.reflect.Method method)
          Whether (this facet is able to determine that) the supplied Method possibly represents the accessor of either a value property, reference property or a collection.
 
Methods inherited from interface org.nakedobjects.metamodel.facets.FacetFactory
getFeatureTypes, process, process, processParams
 

Method Detail

isPropertyOrCollectionAccessorCandidate

boolean isPropertyOrCollectionAccessorCandidate(java.lang.reflect.Method method)
Whether (this facet is able to determine that) the supplied Method possibly represents the accessor of either a value property, reference property or a collection.

For example, if a method name has a prefix of get or alternatively has a prefix of is and returns a boolean, then it would be a candidate.


isPropertyAccessor

boolean isPropertyAccessor(java.lang.reflect.Method method)
Whether (this facet is able to determine that) the supplied Method represents either a value property or a reference property.


isCollectionAccessor

boolean isCollectionAccessor(java.lang.reflect.Method method)
Whether (this facet is able to determine that) the supplied Method represents a collection.


findAndRemovePropertyAccessors

void findAndRemovePropertyAccessors(MethodRemover methodRemover,
                                    java.util.List<java.lang.reflect.Method> methodListToAppendTo)
Use the provided MethodRemover to remove all reference property accessors, and append them to the supplied methodList.


findAndRemoveCollectionAccessors

void findAndRemoveCollectionAccessors(MethodRemover methodRemover,
                                      java.util.List<java.lang.reflect.Method> methodListToAppendTo)
Use the provided MethodRemover to remove all collection accessors, and append them to the supplied methodList.



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