クラス CodeWarnings
java.lang.ObjectSE
org.springframework.beans.factory.aot.CodeWarnings
生成されたコードに対してコンパイラーがトリガーする可能性のある警告を登録するためのヘルパークラス。
- 導入:
- 6.1
- 作成者:
- Stephane Nicoll
- 関連事項:
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明detectDeprecation
(AnnotatedElementSE... elements) 指定された要素上のDeprecated
SE の存在を検出します。detectDeprecation
(StreamSE<AnnotatedElementSE> elements) 指定された要素上のDeprecated
SE の存在を検出します。detectDeprecation
(ResolvableType resolvableType) 指定されたResolvableType
の署名にDeprecated
SE が存在するかどうかを検出します。現在登録されている警告を返します。void
このブロックに含める警告を登録します。protected void
suppress
(ConsumerSE<org.springframework.javapoet.AnnotationSpec.Builder> annotationSpec) 必要に応じて、SuppressWarnings
SE のビルダーを消費します。void
suppress
(org.springframework.javapoet.MethodSpec.Builder method) 必要に応じて、指定されたメソッドにSuppressWarnings
SE を含めます。void
suppress
(org.springframework.javapoet.TypeSpec.Builder type) 必要に応じて、指定された型にSuppressWarnings
SE を含めます。toString()
コンストラクターの詳細
CodeWarnings
public CodeWarnings()
メソッドの詳細
register
このブロックに含める警告を登録します。警告がすでに登録されている場合は何も行いません。- パラメーター:
warning
- 登録されていない場合は登録するよう警告する
detectDeprecation
指定された要素上のDeprecated
SE の存在を検出します。- パラメーター:
elements
- チェックする要素- 戻り値:
this
インスタンス
detectDeprecation
指定された要素上のDeprecated
SE の存在を検出します。- パラメーター:
elements
- チェックする要素- 戻り値:
this
インスタンス
detectDeprecation
指定されたResolvableType
の署名にDeprecated
SE が存在するかどうかを検出します。- パラメーター:
resolvableType
- 型シグネチャー- 戻り値:
this
インスタンス- 導入:
- 6.1.8
suppress
public void suppress(org.springframework.javapoet.MethodSpec.Builder method) 必要に応じて、指定されたメソッドにSuppressWarnings
SE を含めます。- パラメーター:
method
- 更新方法
suppress
public void suppress(org.springframework.javapoet.TypeSpec.Builder type) 必要に応じて、指定された型にSuppressWarnings
SE を含めます。- パラメーター:
type
- 更新する型
suppress
protected void suppress(ConsumerSE<org.springframework.javapoet.AnnotationSpec.Builder> annotationSpec) 必要に応じて、SuppressWarnings
SE のビルダーを使用します。このインスタンスに警告が登録されていない場合、コンシューマーは呼び出されません。- パラメーター:
annotationSpec
-AnnotationSpec.Builder
のコンシューマー- 関連事項:
MethodSpec.Builder.addAnnotation(AnnotationSpec)
TypeSpec.Builder.addAnnotation(AnnotationSpec)
FieldSpec.Builder.addAnnotation(AnnotationSpec)
getWarnings
現在登録されている警告を返します。- 戻り値:
- 警告
toString