クラス CodeWarnings

java.lang.ObjectSE
org.springframework.beans.factory.aot.CodeWarnings

public class CodeWarnings extends ObjectSE
生成されたコードに対してコンパイラーがトリガーする可能性のある警告を登録するためのヘルパークラス。
導入:
6.1
作成者:
Stephane Nicoll
関連事項:
  • コンストラクターの詳細

    • CodeWarnings

      public CodeWarnings()
  • メソッドの詳細

    • register

      public void register(StringSE warning)
      このブロックに含める警告を登録します。警告がすでに登録されている場合は何も行いません。
      パラメーター:
      warning - 登録されていない場合は登録するよう警告する
    • detectDeprecation

      public CodeWarnings detectDeprecation(AnnotatedElementSE... elements)
      指定された要素上の DeprecatedSE の存在を検出します。
      パラメーター:
      elements - チェックする要素
      戻り値:
      this インスタンス
    • detectDeprecation

      public CodeWarnings detectDeprecation(StreamSE<AnnotatedElementSE> elements)
      指定された要素上の DeprecatedSE の存在を検出します。
      パラメーター:
      elements - チェックする要素
      戻り値:
      this インスタンス
    • detectDeprecation

      public CodeWarnings detectDeprecation(ResolvableType resolvableType)
      指定された ResolvableType の署名に DeprecatedSE が存在するかどうかを検出します。
      パラメーター:
      resolvableType - 型シグネチャー
      戻り値:
      this インスタンス
      導入:
      6.1.8
    • suppress

      public void suppress(org.springframework.javapoet.MethodSpec.Builder method)
      必要に応じて、指定されたメソッドに SuppressWarningsSE を含めます。
      パラメーター:
      method - 更新方法
    • suppress

      public void suppress(org.springframework.javapoet.TypeSpec.Builder type)
      必要に応じて、指定された型に SuppressWarningsSE を含めます。
      パラメーター:
      type - 更新する型
    • suppress

      protected void suppress(ConsumerSE<org.springframework.javapoet.AnnotationSpec.Builder> annotationSpec)
      必要に応じて、SuppressWarningsSE のビルダーを使用します。このインスタンスに警告が登録されていない場合、コンシューマーは呼び出されません。
      パラメーター:
      annotationSpec - AnnotationSpec.Builder のコンシューマー
      関連事項:
      • MethodSpec.Builder.addAnnotation(AnnotationSpec)
      • TypeSpec.Builder.addAnnotation(AnnotationSpec)
      • FieldSpec.Builder.addAnnotation(AnnotationSpec)
    • getWarnings

      protected SetSE<StringSE> getWarnings()
      現在登録されている警告を返します。
      戻り値:
      警告
    • toString

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