org.tynamo.descriptor.annotation
Class AbstractAnnotationHandler
java.lang.Object
org.tynamo.descriptor.annotation.AbstractAnnotationHandler
- Direct Known Subclasses:
- BlobDescriptorAnnotationHandler, ClassDescriptorAnnotationHandler, InitialValueAnnotationHandler, MethodDescriptorAnnotationHandler, PossibleValuesAnnotationHandler, PropertyDescriptorAnnotationHandler
public abstract class AbstractAnnotationHandler
- extends Object
- Author:
- Chris Nelson
|
Method Summary |
protected boolean |
isDefault(Annotation propertyDescriptorAnno,
Method annotationMethod)
This method will check if an annotation property has a default value by
see if there is a field named DEFAULT_ + property name. |
protected void |
setPropertiesFromAnnotation(Annotation annotation,
Object target)
For each attribute of annotation, will search for a matching property on
the target and set it with the value of the attribute unless the attribute
is set to the "default" value |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAnnotationHandler
public AbstractAnnotationHandler()
isDefault
protected boolean isDefault(Annotation propertyDescriptorAnno,
Method annotationMethod)
- This method will check if an annotation property has a default value by
see if there is a field named DEFAULT_ + property name. If it has a default
value, we only set the property on the target object if the annotation property is NOT set to
the default value.
- Parameters:
propertyDescriptorAnno - annotationMethod -
- Returns:
setPropertiesFromAnnotation
protected void setPropertiesFromAnnotation(Annotation annotation,
Object target)
- For each attribute of annotation, will search for a matching property on
the target and set it with the value of the attribute unless the attribute
is set to the "default" value
- Parameters:
annotation - descriptor -
Copyright © 2004-2009. All Rights Reserved.