public class AnnotationDetectionFieldCallback extends ObjectSE implements ReflectionUtils.FieldCallback
ReflectionUtils.FieldCallback
。このフィールドの型は、後でアクセスできます。コンストラクターと説明 |
---|
AnnotationDetectionFieldCallback(ClassSE<? extends AnnotationSE> annotationType) 指定された型のアノテーションをスキャンする新しい AnnotationDetectionFieldCallback を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
void | doWith(FieldSE field) |
FieldSE | getField() 検出されたフィールドを返します。 |
FieldSE | getRequiredField() 検出されたフィールドを返します。 |
ClassSE<?> | getRequiredType() フィールドの型を返すか、フィールドが見つからなかった場合は IllegalArgumentException SE をスローします。 |
ClassSE<?> | getType() フィールドの型を返します。 |
<T> T | getValue(ObjectSE source) リフレクションによってフィールドの値を取得します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public AnnotationDetectionFieldCallback(ClassSE<? extends AnnotationSE> annotationType)
AnnotationDetectionFieldCallback
を作成します。annotationType
- null であってはなりません。public void doWith(FieldSE field) throws IllegalArgumentExceptionSE, IllegalAccessExceptionSE
ReflectionUtils.FieldCallback
の doWith
IllegalArgumentExceptionSE
IllegalAccessExceptionSE
public FieldSE getRequiredField()
IllegalStateExceptionSE
- 構成されたアノテーションを持つフィールドが見つからなかった場合。public ClassSE<?> getRequiredType()
IllegalArgumentException
SE をスローします。IllegalStateExceptionSE
- 構成されたアノテーションを持つフィールドが見つからなかった場合。Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.