org.datanucleus.jdo.metadata
Class JDOAnnotationReader

java.lang.Object
  extended by org.datanucleus.metadata.annotations.AbstractAnnotationReader
      extended by org.datanucleus.jdo.metadata.JDOAnnotationReader
All Implemented Interfaces:
AnnotationReader

public class JDOAnnotationReader
extends AbstractAnnotationReader

Implementation for Annotation Reader for JDK 1.5 annotations using the JDO 2.1 definition.


Field Summary
 
Fields inherited from class org.datanucleus.metadata.annotations.AbstractAnnotationReader
LOCALISER, mgr, supportedPackages
 
Constructor Summary
JDOAnnotationReader(org.datanucleus.metadata.MetaDataManager mgr)
          Constructor.
 
Method Summary
protected  org.datanucleus.metadata.AbstractClassMetaData processClassAnnotations(org.datanucleus.metadata.PackageMetaData pmd, java.lang.Class cls, AnnotationObject[] annotations, org.datanucleus.ClassLoaderResolver clr)
          Method to process the "class" level annotations and create the outline ClassMetaData object
protected  org.datanucleus.metadata.AbstractMemberMetaData processMemberAnnotations(org.datanucleus.metadata.AbstractClassMetaData cmd, Member member, AnnotationObject[] annotations, boolean propertyAccessor)
          Convenience method to process the annotations for a field/property.
protected  void processMethodAnnotations(org.datanucleus.metadata.AbstractClassMetaData cmd, java.lang.reflect.Method method)
          Method to take the passed in outline ClassMetaData and process the annotations for method adding any necessary MetaData to the ClassMetaData.
 
Methods inherited from class org.datanucleus.metadata.annotations.AbstractAnnotationReader
getAnnotationObjectsForAnnotations, getClassAnnotationsForClass, getFieldAnnotationsForClass, getJavaBeanAccessorAnnotationsForClass, getMetaDataForClass, getMethodAnnotationsForClass, getSupportedAnnotationPackages, isSupportedAnnotation, setSupportedAnnotationPackages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDOAnnotationReader

public JDOAnnotationReader(org.datanucleus.metadata.MetaDataManager mgr)
Constructor.

Parameters:
mgr - MetaData manager
Method Detail

processClassAnnotations

protected org.datanucleus.metadata.AbstractClassMetaData processClassAnnotations(org.datanucleus.metadata.PackageMetaData pmd,
                                                                                 java.lang.Class cls,
                                                                                 AnnotationObject[] annotations,
                                                                                 org.datanucleus.ClassLoaderResolver clr)
Method to process the "class" level annotations and create the outline ClassMetaData object

Specified by:
processClassAnnotations in class AbstractAnnotationReader
Parameters:
pmd - Parent PackageMetaData
cls - The class
annotations - Annotations for this class
clr - ClassLoader resolver
Returns:
The ClassMetaData/InterfaceMetaData (or null if no annotations)

processMemberAnnotations

protected org.datanucleus.metadata.AbstractMemberMetaData processMemberAnnotations(org.datanucleus.metadata.AbstractClassMetaData cmd,
                                                                                   Member member,
                                                                                   AnnotationObject[] annotations,
                                                                                   boolean propertyAccessor)
Convenience method to process the annotations for a field/property. The passed annotations may have been specified on the field or on the getter methods.

Specified by:
processMemberAnnotations in class AbstractAnnotationReader
Parameters:
cmd - The ClassMetaData/InterfaceMetaData to update
member - The field/property
annotations - Annotations for the field/property
propertyAccessor - if there are properties for this class
Returns:
The FieldMetaData/PropertyMetaData that was added (if any)

processMethodAnnotations

protected void processMethodAnnotations(org.datanucleus.metadata.AbstractClassMetaData cmd,
                                        java.lang.reflect.Method method)
Method to take the passed in outline ClassMetaData and process the annotations for method adding any necessary MetaData to the ClassMetaData.

Specified by:
processMethodAnnotations in class AbstractAnnotationReader
Parameters:
cmd - The ClassMetaData/InterfaceMetaData (to be updated)
method - The method


Copyright © 2009. All Rights Reserved.