|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.metamodel.facets.FacetFactoryAbstract
org.nakedobjects.metamodel.java5.MethodPrefixBasedFacetFactoryAbstract
org.nakedobjects.metamodel.java5.PropertyOrCollectionIdentifyingFacetFactoryAbstract
org.nakedobjects.metamodel.facets.properties.PropertyMethodsFacetFactory
public class PropertyMethodsFacetFactory
| Field Summary | |
|---|---|
protected static java.lang.String |
CLEAR_PREFIX
|
protected static java.lang.String |
GET_PREFIX
|
protected static java.lang.String |
IS_PREFIX
|
protected static java.lang.String |
MODIFY_PREFIX
|
protected static java.lang.String |
SET_PREFIX
|
| Fields inherited from class org.nakedobjects.metamodel.java5.MethodPrefixBasedFacetFactoryAbstract |
|---|
CHOICES_PREFIX, CLASS, DEFAULT_PREFIX, NO_PARAMETERS, NO_PARAMETERS_TYPES, OBJECT, VALIDATE_PREFIX |
| Constructor Summary | |
|---|---|
PropertyMethodsFacetFactory()
|
|
| 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)
The method way well represent a collection, but this facet factory does not have any opinion on the matter. |
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. |
boolean |
process(java.lang.reflect.Method getMethod,
MethodRemover methodRemover,
FacetHolder property)
Process the method, and return the correctly setup annotation if present. |
void |
setRuntimeContext(RuntimeContext runtimeContext)
Injected because RuntimeContextAware. |
| Methods inherited from class org.nakedobjects.metamodel.java5.PropertyOrCollectionIdentifyingFacetFactoryAbstract |
|---|
getCollectionTypeRepository, isCollectionOrArray, setCollectionTypeRegistry |
| Methods inherited from class org.nakedobjects.metamodel.facets.FacetFactoryAbstract |
|---|
getFeatureTypes, getSpecificationLoader, process, processParams, setSpecificationLoader |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.nakedobjects.metamodel.facets.FacetFactory |
|---|
getFeatureTypes, process, processParams |
| Field Detail |
|---|
protected static final java.lang.String CLEAR_PREFIX
protected static final java.lang.String GET_PREFIX
protected static final java.lang.String IS_PREFIX
protected static final java.lang.String MODIFY_PREFIX
protected static final java.lang.String SET_PREFIX
| Constructor Detail |
|---|
public PropertyMethodsFacetFactory()
| Method Detail |
|---|
public boolean process(java.lang.reflect.Method getMethod,
MethodRemover methodRemover,
FacetHolder property)
FacetFactory
process in interface FacetFactoryprocess in class FacetFactoryAbstractgetMethod - - method representing the feature being processed (getter for property or collection, or
action)methodRemover - - allow any methods of the class to be removedproperty - - to attach the facets to
public boolean isPropertyOrCollectionAccessorCandidate(java.lang.reflect.Method method)
PropertyOrCollectionIdentifyingFacetFactoryMethod 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.
isPropertyOrCollectionAccessorCandidate in interface PropertyOrCollectionIdentifyingFacetFactorypublic boolean isCollectionAccessor(java.lang.reflect.Method method)
isCollectionAccessor in interface PropertyOrCollectionIdentifyingFacetFactorypublic boolean isPropertyAccessor(java.lang.reflect.Method method)
PropertyOrCollectionIdentifyingFacetFactoryMethod represents either a
value property or a reference property.
isPropertyAccessor in interface PropertyOrCollectionIdentifyingFacetFactory
public void findAndRemovePropertyAccessors(MethodRemover methodRemover,
java.util.List<java.lang.reflect.Method> methodListToAppendTo)
PropertyOrCollectionIdentifyingFacetFactoryMethodRemover to remove all reference property accessors, and append them to
the supplied methodList.
findAndRemovePropertyAccessors in interface PropertyOrCollectionIdentifyingFacetFactory
public void findAndRemoveCollectionAccessors(MethodRemover methodRemover,
java.util.List<java.lang.reflect.Method> methodListToAppendTo)
PropertyOrCollectionIdentifyingFacetFactoryMethodRemover to remove all collection accessors, and append them to the
supplied methodList.
findAndRemoveCollectionAccessors in interface PropertyOrCollectionIdentifyingFacetFactorypublic void setRuntimeContext(RuntimeContext runtimeContext)
RuntimeContextAware.
setRuntimeContext in interface RuntimeContextAware
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||