Class AnnotationManagerImpl
- 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 MetaDataManager
metadataMgr
MetaData 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 boolean
getClassAnnotationHasHandler(String annotationName)
ClassAnnotationHandler
getHandlerForClassAnnotation(String annotationName)
Accessor for a handler for the specified class annotation.MemberAnnotationHandler
getHandlerForMemberAnnotation(String annotationName)
Accessor for a handler for the specified member annotation.boolean
getMemberAnnotationHasHandler(String annotationName)
AbstractClassMetaData
getMetaDataForClass(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:
getMetaDataForClass
in interfaceAnnotationManager
- Parameters:
cls
- The classpmd
- PackageMetaData to use as a parentclr
- ClassLoader resolver- Returns:
- The ClassMetaData
-
getClassAnnotationHasHandler
public boolean getClassAnnotationHasHandler(String annotationName)
- Specified by:
getClassAnnotationHasHandler
in interfaceAnnotationManager
-
getMemberAnnotationHasHandler
public boolean getMemberAnnotationHasHandler(String annotationName)
- Specified by:
getMemberAnnotationHasHandler
in interfaceAnnotationManager
-
getHandlerForClassAnnotation
public ClassAnnotationHandler getHandlerForClassAnnotation(String annotationName)
Description copied from interface:AnnotationManager
Accessor for a handler for the specified class annotation.- Specified by:
getHandlerForClassAnnotation
in 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:AnnotationManager
Accessor for a handler for the specified member annotation.- Specified by:
getHandlerForMemberAnnotation
in interfaceAnnotationManager
- Parameters:
annotationName
- Annotation to be handled- Returns:
- The handler (if any). Takes the first one, so only register one handler
-
-