T
- アノテーション型 public static class MetaAnnotationUtils.AnnotationDescriptor<T extends AnnotationSE> extends ObjectSE
Annotation
SE の記述子。アノテーションが宣言されているクラスと実際のアノテーションインスタンスが含まれます。アノテーションがメタアノテーションとして使用される場合、記述子には、アノテーションが存在する合成アノテーションも含まれます。このような場合、ルート宣言クラスには直接アノテーションが付けられず、合成されたアノテーションを介して間接的に付けられます。
次の例の場合、TransactionalTests
クラスの @Transactional
アノテーションを検索すると、AnnotationDescriptor
のプロパティは次のようになります。
TransactionalTests
クラスオブジェクト TransactionalTests
クラスオブジェクト null
Transactional
アノテーションのインスタンス @Transactional @ContextConfiguration({"/test-datasource.xml", "/repository-config.xml"}) public class TransactionalTests { }
次の例の場合、UserRepositoryTests
クラスの @Transactional
アノテーションを検索すると、AnnotationDescriptor
のプロパティは次のようになります。
UserRepositoryTests
クラスオブジェクト RepositoryTests
クラスオブジェクト RepositoryTests
アノテーションのインスタンス Transactional
アノテーションのインスタンス @Transactional @ContextConfiguration({"/test-datasource.xml", "/repository-config.xml"}) @Retention(RetentionPolicy.RUNTIME) public @interface RepositoryTests { } @RepositoryTests public class UserRepositoryTests { }
コンストラクターと説明 |
---|
AnnotationDescriptor(ClassSE<?> rootDeclaringClass, ClassSE<?> declaringClass, AnnotationSE composedAnnotation, T annotation) |
AnnotationDescriptor(ClassSE<?> rootDeclaringClass, T annotation) |
修飾子と型 | メソッドと説明 |
---|---|
T | getAnnotation() |
AnnotationAttributes | getAnnotationAttributes() |
ClassSE<? extends AnnotationSE> | getAnnotationType() |
AnnotationSE | getComposedAnnotation() |
ClassSE<? extends AnnotationSE> | getComposedAnnotationType() |
ClassSE<?> | getDeclaringClass() |
ClassSE<?> | getRootDeclaringClass() |
T | synthesizeAnnotation() この記述子でマージされた AnnotationAttributes を合成して、ターゲットアノテーション型のアノテーションに戻します。 |
StringSE | toString() この AnnotationDescriptor のテキスト表現を提供します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public AnnotationDescriptor(ClassSE<?> rootDeclaringClass, ClassSE<?> declaringClass, @Nullable AnnotationSE composedAnnotation, T annotation)
public ClassSE<?> getRootDeclaringClass()
public ClassSE<?> getDeclaringClass()
public T getAnnotation()
public T synthesizeAnnotation()
AnnotationAttributes
を合成して、ターゲットアノテーション型のアノテーションに戻します。public ClassSE<? extends AnnotationSE> getAnnotationType()
public AnnotationAttributes getAnnotationAttributes()
@Nullable public AnnotationSE getComposedAnnotation()
@Nullable public ClassSE<? extends AnnotationSE> getComposedAnnotationType()
public StringSE toString()
AnnotationDescriptor
のテキスト表現を提供します。ObjectSE
の toStringSE