org.loom.annotation.processor
Class AbstractPropertyAnnotationProcessor<A extends java.lang.annotation.Annotation,M extends java.lang.annotation.Annotation>

java.lang.Object
  extended by org.loom.annotation.processor.AbstractAnnotationProcessor
      extended by org.loom.annotation.processor.AbstractPropertyAnnotationProcessor<A,M>
Type Parameters:
A - The single annotation class
M - The multiple annotation class. It must have a single value property of type A[]
All Implemented Interfaces:
java.lang.Comparable<AnnotationProcessor>, AnnotationProcessor
Direct Known Subclasses:
BasicAnnotationProcessor, ColumnAnnotationProcessor, DateValidationAnnotationProcessor, EagerPropertyAnnotationProcessor, NumberValidationAnnotationProcessor, RequiredValidationAnnotationProcessor, RetrieveEntityAnnotationProcessor, StringValidationAnnotationProcessor

public abstract class AbstractPropertyAnnotationProcessor<A extends java.lang.annotation.Annotation,M extends java.lang.annotation.Annotation>
extends AbstractAnnotationProcessor

Convenience class for annotations that are bound to a property and might be boundmore than once, which requires some workarounds since this is not possible with java.


Constructor Summary
protected AbstractPropertyAnnotationProcessor(java.lang.Class<A> annotationClass)
           
protected AbstractPropertyAnnotationProcessor(java.lang.Class<A> annotationClass, java.lang.Class<M> multipleAnnotationClass)
           
 
Method Summary
 void process(Event event)
          Expands an ActionMapping with the metadata annotated to an Action class.
protected abstract  void process(Event event, A annotation, java.lang.String propertyPath)
          Process a single annotation.
 void setPropertyWrapperFactory(PropertyWrapperFactory propertyWrapperFactory)
           
 
Methods inherited from class org.loom.annotation.processor.AbstractAnnotationProcessor
compareTo, getOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPropertyAnnotationProcessor

protected AbstractPropertyAnnotationProcessor(java.lang.Class<A> annotationClass,
                                              java.lang.Class<M> multipleAnnotationClass)

AbstractPropertyAnnotationProcessor

protected AbstractPropertyAnnotationProcessor(java.lang.Class<A> annotationClass)
Method Detail

process

public final void process(Event event)
Description copied from interface: AnnotationProcessor
Expands an ActionMapping with the metadata annotated to an Action class. This method processes any annotations attached to the Action class or any containing package.

Specified by:
process in interface AnnotationProcessor
Specified by:
process in class AbstractAnnotationProcessor
Parameters:
event - the event to be modified

process

protected abstract void process(Event event,
                                A annotation,
                                java.lang.String propertyPath)
Process a single annotation. This method gets invoked once per annotated property or for eaxch value inside a multiple annotation

Parameters:
event - the Event that is being processed
annotation - the annotation that should be processed
propertyPath - the property that is annotated with a single or multiple annotation

setPropertyWrapperFactory

public void setPropertyWrapperFactory(PropertyWrapperFactory propertyWrapperFactory)