Package org.apache.rat
Class DeprecationReporter
java.lang.Object
org.apache.rat.DeprecationReporter
Reporting methods for deprecated objects.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAnnotation to provide deprecation information for Java8. -
Method Summary
Modifier and TypeMethodDescriptionstatic Consumer<org.apache.commons.cli.Option>Get the default reporter.static Consumer<org.apache.commons.cli.Option>Creates the consumer that will log usage of deprecated operations to the default log.static voidlogDeprecated(Class<?> clazz)Log Deprecated class use.static voidlogDeprecated(String name, String since, boolean forRemoval, String use)Log Deprecated class use.static voidRests the consumer to the default consumer.static voidsetLogReporter(Consumer<org.apache.commons.cli.Option> consumer)Sets the consumer that will do the reporting.
-
Method Details
-
getDefault
Get the default reporter.- Returns:
- The default reporter.
-
getLogReporter
Creates the consumer that will log usage of deprecated operations to the default log.- Returns:
- The consumer that will log usage of deprecated operations to the default log.
-
setLogReporter
Sets the consumer that will do the reporting.- Parameters:
consumer- The consumer that will do the reporting.
-
resetLogReporter
public static void resetLogReporter()Rests the consumer to the default consumer. -
logDeprecated
Log Deprecated class use.- Parameters:
clazz- the Deprecated class to log
-
logDeprecated
Log Deprecated class use.- Parameters:
name- The name of the deprecated tagsince- The version where the deprecation was declared.forRemoval- Iftruethen tag is scheduled for removal.use- What to use instead.
-