org.tynamo.descriptor.annotation.handlers
Class AnnotationHandlerUtils

java.lang.Object
  extended by org.tynamo.descriptor.annotation.handlers.AnnotationHandlerUtils

public class AnnotationHandlerUtils
extends Object


Constructor Summary
AnnotationHandlerUtils()
           
 
Method Summary
static 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.
static 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
 

Constructor Detail

AnnotationHandlerUtils

public AnnotationHandlerUtils()
Method Detail

isDefault

public static 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

public static 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-2012. All Rights Reserved.