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