クラス InjectionPoint

java.lang.ObjectSE
org.springframework.beans.factory.InjectionPoint
既知の直属サブクラス
DependencyDescriptor

public class InjectionPoint extends ObjectSE
メソッド / コンストラクターのパラメーターまたはフィールドを指す、インジェクションポイントの単純な記述子。UnsatisfiedDependencyException によって公開されます。ファクトリメソッドの引数としても利用でき、カスタマイズされた Bean インスタンスを構築するためのリクエストインジェクションポイントに反応します。
導入:
4.3
作成者:
Juergen Hoeller
関連事項:
  • フィールドの詳細

  • コンストラクターの詳細

    • InjectionPoint

      public InjectionPoint(MethodParameter methodParameter)
      メソッドまたはコンストラクターパラメーターのインジェクションポイント記述子を作成します。
      パラメーター:
      methodParameter - ラップする MethodParameter
    • InjectionPoint

      public InjectionPoint(FieldSE field)
      フィールドのインジェクションポイント記述子を作成します。
      パラメーター:
      field - ラップするフィールド
    • InjectionPoint

      protected InjectionPoint(InjectionPoint original)
      コピーコンストラクター。
      パラメーター:
      original - コピーを作成する元の記述子
    • InjectionPoint

      protected InjectionPoint()
      サブクラスでの直列化の目的でのみ使用できます。
  • メソッドの詳細

    • getMethodParameter

      @Nullable public MethodParameter getMethodParameter()
      ラップされた MethodParameter があれば、それを返します。

      メモ: MethodParameter またはフィールドのいずれかを使用できます。

      戻り値:
      MethodParameter、ない場合は null 
    • getField

      @Nullable public FieldSE getField()
      ラップされたフィールドがあれば返します。

      メモ: MethodParameter またはフィールドのいずれかを使用できます。

      戻り値:
      フィールド、ない場合は null 
    • obtainMethodParameter

      protected final MethodParameter obtainMethodParameter()
      存在する場合、ラップされた MethodParameter を返します。
      戻り値:
      MethodParameter (非 null)
      例外:
      IllegalStateExceptionSE - MethodParameter が利用できない場合
      導入:
      5.0
    • getAnnotations

      public AnnotationSE[] getAnnotations()
      ラップされたフィールドまたはメソッド / コンストラクターパラメーターに関連付けられたアノテーションを取得します。
    • getAnnotation

      @Nullable public <A extends AnnotationSE> A getAnnotation(ClassSE<A> annotationType)
      指定された型のフィールド / パラメーターアノテーションがあれば、それを取得します。
      パラメーター:
      annotationType - 取得するアノテーション型
      戻り値:
      アノテーションインスタンス、または見つからない場合は null 
      導入:
      4.3.9
    • getDeclaredType

      public ClassSE<?> getDeclaredType()
      基になるフィールドまたはメソッド / コンストラクターパラメーターによって宣言された型を返し、注入の型を示します。
    • getMember

      public MemberSE getMember()
      インジェクションポイントを含む、ラップされたメンバーを返します。
      戻り値:
      フィールド / メソッド / メンバーとしてのコンストラクター
    • getAnnotatedElement

      public AnnotatedElementSE getAnnotatedElement()
      ラップされたアノテーション付き要素を返します。

      メモ: メソッド / コンストラクターパラメーターの場合、これはメソッドまたはコンストラクター自体で宣言されたアノテーションを公開します(つまり、パラメーターレベルではなく、メソッド / コンストラクターレベルで)。getAnnotations() を使用して、このようなシナリオでパラメーターレベルのアノテーションを取得し、対応するフィールドのアノテーションを透過的に使用します。

      戻り値:
      フィールド / メソッド / AnnotatedElement としてのコンストラクター
    • equals

      public boolean equals(@Nullable ObjectSE other)
      オーバーライド:
      クラス ObjectSEequalsSE 
    • hashCode

      public int hashCode()
      オーバーライド:
      クラス ObjectSEhashCode 
    • toString

      public StringSE toString()
      オーバーライド:
      クラス ObjectSEtoString