org.apache.tapestry.annotations
Class InitialValueAnnotationWorker
java.lang.Object
org.apache.tapestry.annotations.InitialValueAnnotationWorker
- All Implemented Interfaces:
- SecondaryAnnotationWorker
public class InitialValueAnnotationWorker
- extends java.lang.Object
- implements SecondaryAnnotationWorker
Looks for InitialValue
annotations on methods that don't
have a Persist
annotation (that's handled by
PersistAnnotationWorker
); adds an
IPropertySpecification
for the property, so that its initial
value may be set.
- Since:
- 4.0
- Author:
- Howard M. Lewis Ship
Method Summary |
boolean |
canEnhance(java.lang.reflect.Method method)
Returns true if the method has the InitialValue annotation. |
void |
peformEnhancement(org.apache.tapestry.enhance.EnhancementOperation op,
org.apache.tapestry.spec.IComponentSpecification spec,
java.lang.reflect.Method method,
org.apache.hivemind.Resource classResource)
Invoked an all workers in the command chain, if any worker returns true
from SecondaryAnnotationWorker.canEnhance(Method) . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InitialValueAnnotationWorker
public InitialValueAnnotationWorker()
canEnhance
public boolean canEnhance(java.lang.reflect.Method method)
- Returns true if the method has the InitialValue annotation.
- Specified by:
canEnhance
in interface SecondaryAnnotationWorker
- Parameters:
method
- to check
- Returns:
- true if the worker should be invoked, false otherwise
peformEnhancement
public void peformEnhancement(org.apache.tapestry.enhance.EnhancementOperation op,
org.apache.tapestry.spec.IComponentSpecification spec,
java.lang.reflect.Method method,
org.apache.hivemind.Resource classResource)
- Description copied from interface:
SecondaryAnnotationWorker
- Invoked an all workers in the command chain, if any worker returns true
from
SecondaryAnnotationWorker.canEnhance(Method)
.
- Specified by:
peformEnhancement
in interface SecondaryAnnotationWorker
- Parameters:
op
- enhancement operationspec
- specification for the component being enhancedmethod
- the methodclassResource
- a resource representing the class; combined with the method a
Location
can be created