|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.metamodel.specloader.internal.facetprocessor.FacetProcessor
public class FacetProcessor
| Constructor Summary | |
|---|---|
FacetProcessor(NakedObjectConfiguration configuration,
SpecificationLoader specificationLoader,
CollectionTypeRegistry collectionTypeRegistry,
ProgrammingModelFacets programmingModelFacets)
|
|
| Method Summary | |
|---|---|
void |
findAndRemoveCollectionAccessors(MethodRemover methodRemover,
java.util.List<java.lang.reflect.Method> methodListToAppendTo)
Use the provided MethodRemover to have all known
PropertyOrCollectionIdentifyingFacetFactorys to remove all property 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 have all known
PropertyOrCollectionIdentifyingFacetFactorys to remove all property accessors, and append them
to the supplied methodList. |
java.util.Set<java.lang.reflect.Method> |
findPropertyOrCollectionCandidateAccessors(java.lang.reflect.Method[] methods,
java.util.Set<java.lang.reflect.Method> candidates)
Appends to the supplied Set all of the Methods that may represent a property or
collection. |
FacetFactory |
getFactoryByFactoryType(java.lang.Class<? extends FacetFactory> factoryType)
|
void |
init()
|
void |
injectDependenciesInto(FacetFactory factory)
This is public so that can be used for @Facets processing in JavaIntrospector. |
boolean |
process(java.lang.Class<?> cls,
MethodRemover methodRemover,
FacetHolder facetHolder)
Attaches all facets applicable to the provided object) to the
supplied FacetHolder. |
boolean |
process(java.lang.reflect.Method method,
MethodRemover methodRemover,
FacetHolder facetHolder,
NakedObjectFeatureType featureType)
Attaches all facets applicable to the provided type of feature to the
supplied FacetHolder. |
boolean |
processParams(java.lang.reflect.Method method,
int paramNum,
FacetHolder facetHolder)
Attaches all facets applicable to the provided parameter), to the supplied FacetHolder. |
boolean |
recognizes(java.lang.reflect.Method method)
Whether this method is recognized by any of the FacetFactorys. |
void |
registerFactory(FacetFactory factory)
|
void |
setRuntimeContext(RuntimeContext runtimeContext)
Injected so can propogate to any registered FacetFactory
s that are also RuntimeContextAware. |
void |
shutdown()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FacetProcessor(NakedObjectConfiguration configuration,
SpecificationLoader specificationLoader,
CollectionTypeRegistry collectionTypeRegistry,
ProgrammingModelFacets programmingModelFacets)
| Method Detail |
|---|
public void init()
public void shutdown()
public void registerFactory(FacetFactory factory)
public void injectDependenciesInto(FacetFactory factory)
JavaIntrospector.
See bug-517.
public FacetFactory getFactoryByFactoryType(java.lang.Class<? extends FacetFactory> factoryType)
public java.util.Set<java.lang.reflect.Method> findPropertyOrCollectionCandidateAccessors(java.lang.reflect.Method[] methods,
java.util.Set<java.lang.reflect.Method> candidates)
Set all of the Methods that may represent a property or
collection.
Delegates to all known PropertyOrCollectionIdentifyingFacetFactorys.
public void findAndRemovePropertyAccessors(MethodRemover methodRemover,
java.util.List<java.lang.reflect.Method> methodListToAppendTo)
MethodRemover to have all known
PropertyOrCollectionIdentifyingFacetFactorys to remove all property accessors, and append them
to the supplied methodList.
Intended to be called after #findAndRemoveValuePropertyAccessors(MethodRemover, List) once only
reference properties remain.
PropertyOrCollectionIdentifyingFacetFactory#findAndRemoveValuePropertyAccessors(MethodRemover,
List)
public void findAndRemoveCollectionAccessors(MethodRemover methodRemover,
java.util.List<java.lang.reflect.Method> methodListToAppendTo)
MethodRemover to have all known
PropertyOrCollectionIdentifyingFacetFactorys to remove all property accessors, and append them
to the supplied methodList.
PropertyOrCollectionIdentifyingFacetFactory.findAndRemoveCollectionAccessors(MethodRemover, List)public boolean recognizes(java.lang.reflect.Method method)
method is recognized by any of the FacetFactorys.
Typically this is when method has a specific prefix, such as validate or hide. Specifically, it checks:
MethodPrefixBasedFacetFactoryMethodFilteringFacetFactory
The design of MethodPrefixBasedFacetFactory (whereby this facet factory set does the work) is a
slight performance optimization for when there are multiple facet factories that search for the same
prefix.
public boolean process(java.lang.Class<?> cls,
MethodRemover methodRemover,
FacetHolder facetHolder)
object) to the
supplied FacetHolder.
Delegates to FacetFactory#process(Class, FacetHolder) for each appropriate factory.
cls - - class to processfacetHolder - - holder to attach facets to.
FacetFactory.process(Class, MethodRemover, FacetHolder)
public boolean process(java.lang.reflect.Method method,
MethodRemover methodRemover,
FacetHolder facetHolder,
NakedObjectFeatureType featureType)
type of feature to the
supplied FacetHolder.
Delegates to FacetFactory#process(Method, FacetHolder) for each appropriate factory.
method - - method to processfacetHolder - - holder to attach facets to.featureType - - what type of feature the method represents (property, action, collection etc)
FacetFactory#process(Method, FacetHolder)
public boolean processParams(java.lang.reflect.Method method,
int paramNum,
FacetHolder facetHolder)
parameter), to the supplied FacetHolder.
Delegates to FacetFactory.processParams(Method, int, FacetHolder) for each appropriate factory.
method - - action method to processparamNum - - 0-basedfacetHolder - - holder to attach facets to.
FacetFactory.processParams(Method, int, FacetHolder)public void setRuntimeContext(RuntimeContext runtimeContext)
registered FacetFactory
s that are also RuntimeContextAware.
setRuntimeContext in interface RuntimeContextAware
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||