- java.lang.Object
-
- org.datanucleus.metadata.annotations.AnnotationManagerImpl
-
- All Implemented Interfaces:
AnnotationManager
public class AnnotationManagerImpl extends Object implements AnnotationManager
Manager for annotations. Acts as a registry of the available annotation readers and allows use of all types of registered annotations.
-
-
Field Summary
Fields Modifier and Type Field Description protected MetaDataManagermetadataMgrMetaData Manager that we work for.
-
Constructor Summary
Constructors Constructor Description AnnotationManagerImpl(MetaDataManager metadataMgr)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetClassAnnotationHasHandler(String annotationName)ClassAnnotationHandlergetHandlerForClassAnnotation(String annotationName)Accessor for a handler for the specified class annotation.MemberAnnotationHandlergetHandlerForMemberAnnotation(String annotationName)Accessor for a handler for the specified member annotation.booleangetMemberAnnotationHasHandler(String annotationName)AbstractClassMetaDatagetMetaDataForClass(Class cls, PackageMetaData pmd, ClassLoaderResolver clr)Accessor for the MetaData for the specified class, read from annotations.
-
-
-
Field Detail
-
metadataMgr
protected final MetaDataManager metadataMgr
MetaData Manager that we work for.
-
-
Constructor Detail
-
AnnotationManagerImpl
public AnnotationManagerImpl(MetaDataManager metadataMgr)
Constructor.- Parameters:
metadataMgr- Manager for MetaData
-
-
Method Detail
-
getMetaDataForClass
public AbstractClassMetaData getMetaDataForClass(Class cls, PackageMetaData pmd, ClassLoaderResolver clr)
Accessor for the MetaData for the specified class, read from annotations. The annotations can be of any supported type.- Specified by:
getMetaDataForClassin interfaceAnnotationManager- Parameters:
cls- The classpmd- PackageMetaData to use as a parentclr- ClassLoader resolver- Returns:
- The ClassMetaData
-
getClassAnnotationHasHandler
public boolean getClassAnnotationHasHandler(String annotationName)
- Specified by:
getClassAnnotationHasHandlerin interfaceAnnotationManager
-
getMemberAnnotationHasHandler
public boolean getMemberAnnotationHasHandler(String annotationName)
- Specified by:
getMemberAnnotationHasHandlerin interfaceAnnotationManager
-
getHandlerForClassAnnotation
public ClassAnnotationHandler getHandlerForClassAnnotation(String annotationName)
Description copied from interface:AnnotationManagerAccessor for a handler for the specified class annotation.- Specified by:
getHandlerForClassAnnotationin interfaceAnnotationManager- Parameters:
annotationName- Annotation to be handled.- Returns:
- The handler (if any). Takes the first one, so only register one handler
-
getHandlerForMemberAnnotation
public MemberAnnotationHandler getHandlerForMemberAnnotation(String annotationName)
Description copied from interface:AnnotationManagerAccessor for a handler for the specified member annotation.- Specified by:
getHandlerForMemberAnnotationin interfaceAnnotationManager- Parameters:
annotationName- Annotation to be handled- Returns:
- The handler (if any). Takes the first one, so only register one handler
-
-