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:
AnnotationProcessor
Direct Known Subclasses:
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.

Author:
icoloma

Constructor Summary
AbstractPropertyAnnotationProcessor(java.lang.Class<A> annotationClass, java.lang.Class<M> multipleAnnotationClass)
           
 
Method Summary
protected abstract  void process(ActionMapping mapping, A annotation, FilteredAnnotationContainer property)
          Process a single annotation.
 void process(AnnotationMetadata metadata, ActionMapping mapping)
          Expands an ActionMapping with the metadata annotated to an Action class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPropertyAnnotationProcessor

public AbstractPropertyAnnotationProcessor(java.lang.Class<A> annotationClass,
                                           java.lang.Class<M> multipleAnnotationClass)
Method Detail

process

public final void process(AnnotationMetadata metadata,
                          ActionMapping mapping)
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:
metadata - the annotation metadata to be processed
mapping - the action mapping to be modified

process

protected abstract void process(ActionMapping mapping,
                                A annotation,
                                FilteredAnnotationContainer property)
Process a single annotation. This method gets invoked once per annotated property or for eaxch value inside a multiple annotation

Parameters:
mapping - the ActionMapping that is being processed
annotation - the annotation that should be processed
property - the property that is annotated with a single or multiple annotation


The Loom Framework 1.6-SNAPSHOT.
Licensed under the Apache License, Version 2.0 by Extrema Sistemas de Informacion S.L.