クラス AnnotationDetectionFieldCallback

java.lang.ObjectSE
org.springframework.data.util.AnnotationDetectionFieldCallback
実装されているすべてのインターフェース:
ReflectionUtils.FieldCallback

public class AnnotationDetectionFieldCallback extends ObjectSE implements ReflectionUtils.FieldCallback
特定のアノテーションについて各フィールドをインスペクションする ReflectionUtils.FieldCallback。このフィールドの型は、後でアクセスできます。
作成者:
Oliver Gierke, Christoph Strobl, Mark Paluch, Johannes Englmeier
  • コンストラクターの詳細

    • AnnotationDetectionFieldCallback

      public AnnotationDetectionFieldCallback(ClassSE<? extends AnnotationSE> annotationType)
      指定された型のアノテーションをスキャンする新しい AnnotationDetectionFieldCallback を作成します。
      パラメーター:
      annotationType - null であってはなりません。
  • メソッドの詳細

    • doWith

      public void doWith(FieldSE field) throws IllegalArgumentExceptionSE, IllegalAccessExceptionSE
      次で指定:
      インターフェース ReflectionUtils.FieldCallbackdoWith 
      例外:
      IllegalArgumentExceptionSE
      IllegalAccessExceptionSE
    • getField

      public @Nullable FieldSE getField()
      検出されたフィールドを返します。
      戻り値:
      フィールド
    • getRequiredField

      public FieldSE getRequiredField()
      検出されたフィールドを返します。
      戻り値:
      例外:
      IllegalStateExceptionSE - 構成されたアノテーションを持つフィールドが見つからなかった場合。
    • getType

      public @Nullable ClassSE<?> getType()
      フィールドの型を返します。
      戻り値:
    • getRequiredType

      public ClassSE<?> getRequiredType()
      フィールドの型を返すか、フィールドが見つからなかった場合は IllegalArgumentExceptionSE をスローします。
      戻り値:
      例外:
      IllegalStateExceptionSE - 構成されたアノテーションを持つフィールドが見つからなかった場合。
    • getValue

      public <T> @Nullable T getValue(ObjectSE source)
      リフレクションによってフィールドの値を取得します。
      パラメーター:
      source - null であってはなりません。
      戻り値: