Package org.apache.xbean.finder
Class AnnotationFinder.Annotatable
- java.lang.Object
-
- org.apache.xbean.finder.AnnotationFinder.Annotatable
-
- Direct Known Subclasses:
AnnotationFinder.AnnotationInfo
,AnnotationFinder.ClassInfo
,AnnotationFinder.FieldInfo
,AnnotationFinder.MethodInfo
,AnnotationFinder.PackageInfo
,AnnotationFinder.ParameterInfo
- Enclosing class:
- AnnotationFinder
public class AnnotationFinder.Annotatable extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<AnnotationFinder.AnnotationInfo>
annotations
-
Constructor Summary
Constructors Constructor Description Annotatable()
Annotatable(java.lang.reflect.AnnotatedElement element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<AnnotationFinder.AnnotationInfo>
getAnnotations()
private java.lang.annotation.Annotation[]
getAnnotations(java.lang.reflect.AnnotatedElement element)
Utility method to get around some errors caused by interactions between the Equinox class loaders and the OpenJPA transformation process.java.lang.annotation.Annotation[]
getDeclaredAnnotations()
java.lang.String
getMetaAnnotationName()
-
-
-
Field Detail
-
annotations
private final java.util.List<AnnotationFinder.AnnotationInfo> annotations
-
-
Method Detail
-
getDeclaredAnnotations
public java.lang.annotation.Annotation[] getDeclaredAnnotations()
-
getAnnotations
public java.util.List<AnnotationFinder.AnnotationInfo> getAnnotations()
-
getMetaAnnotationName
public java.lang.String getMetaAnnotationName()
-
getAnnotations
private java.lang.annotation.Annotation[] getAnnotations(java.lang.reflect.AnnotatedElement element)
Utility method to get around some errors caused by interactions between the Equinox class loaders and the OpenJPA transformation process. There is a window where the OpenJPA transformation process can cause an annotation being processed to get defined in a classloader during the actual defineClass call for that very class (e.g., recursively). This results in a LinkageError exception. If we see one of these, retry the request. Since the annotation will be defined on the second pass, this should succeed. If we get a second exception, then it's likely some other problem.- Parameters:
element
- The AnnotatedElement we need information for.- Returns:
- An array of the Annotations defined on the element.
-
-