org.oddjob.arooa.deploy
Class ArooaAnnotationsHelper

java.lang.Object
  extended by org.oddjob.arooa.deploy.ArooaAnnotationsHelper
All Implemented Interfaces:
ArooaAnnotations

public class ArooaAnnotationsHelper
extends Object
implements ArooaAnnotations

A simple implementation ArooaAnnotations.

Author:
rob

Constructor Summary
ArooaAnnotationsHelper(ArooaClass classIdentifier)
          Constructor.
 
Method Summary
 void addAnnotationDefintion(AnnotationDefinition defintion)
          Add an annotation definition.
 void addPropertyDefinition(PropertyDefinition definition)
          Add a property definition.
 String[] annotatedProperties()
          Provide all properties that are annotated.
 ArooaAnnotation annotationForProperty(String propertyName, String annotationName)
          Get the Annotation for a property by annotation name.
 ArooaAnnotation[] annotationsForProperty(String propertyName)
          Get all the annotations for a property.
 Method methodFor(String annotationName)
          Get the method for an annotation name.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArooaAnnotationsHelper

public ArooaAnnotationsHelper(ArooaClass classIdentifier)
Constructor.

Parameters:
classIdentifier -
Method Detail

addPropertyDefinition

public void addPropertyDefinition(PropertyDefinition definition)
Add a property definition.

Parameters:
definition -

addAnnotationDefintion

public void addAnnotationDefintion(AnnotationDefinition defintion)
Add an annotation definition.

Parameters:
defintion -

methodFor

public Method methodFor(String annotationName)
Description copied from interface: ArooaAnnotations
Get the method for an annotation name.

Specified by:
methodFor in interface ArooaAnnotations
Parameters:
annotationName - The annotation name.
Returns:
the method for the annotation name, or null if there isn't one.

annotatedProperties

public String[] annotatedProperties()
Description copied from interface: ArooaAnnotations
Provide all properties that are annotated.

Specified by:
annotatedProperties in interface ArooaAnnotations
Returns:
Array of properties or an empty array. Never null.

annotationsForProperty

public ArooaAnnotation[] annotationsForProperty(String propertyName)
Description copied from interface: ArooaAnnotations
Get all the annotations for a property.

Specified by:
annotationsForProperty in interface ArooaAnnotations
Parameters:
propertyName - The property name.
Returns:
An array of annotations, may be empty, never null.

annotationForProperty

public ArooaAnnotation annotationForProperty(String propertyName,
                                             String annotationName)
Description copied from interface: ArooaAnnotations
Get the Annotation for a property by annotation name.

Specified by:
annotationForProperty in interface ArooaAnnotations
Parameters:
propertyName - The name of the property.
annotationName - The name of the annotation.
Returns:
The annotation, or null if one doesn't exist.

toString

public String toString()
Overrides:
toString in class Object