Class ExtensionExtractor
java.lang.Object
com.djrapitops.plan.extension.extractor.ExtensionExtractor
Implementation detail, for extracting methods from
DataExtension.
This class can be used for testing validity of annotation implementations
in your unit tests to avoid runtime errors. validateAnnotations()
-
Constructor Summary
ConstructorsConstructorDescriptionExtensionExtractor(DataExtension extension) Utility for extracting annotations and methods from DataExtension. -
Method Summary
Modifier and TypeMethodDescriptionGet list of invalidated methods.Gets the extracted method utilities.Get the plugin info annotationstatic <T extends DataExtension>
StringgetPluginName(Class<T> extensionClass) Deprecated.Get Tab annotations if present.Get the TabInfo annotations if present.Get the TabOrder annotation if present.Get list of warnings produced by the parser.voidUse this method in an unit test to validate your DataExtension.
-
Constructor Details
-
ExtensionExtractor
Utility for extracting annotations and methods from DataExtension.Use with unit tests if necessary.
- Parameters:
extension- Your DataExtension implementation.
-
-
Method Details
-
getPluginName
Deprecated.UseDataExtension.getPluginName()instead.Deprecated plugin name get method.- Type Parameters:
T- Type of the class- Parameters:
extensionClass- Class that has PluginInfo annotation- Returns:
- Plugin name in
PluginInfoannotation.
-
validateAnnotations
public void validateAnnotations()Use this method in an unit test to validate your DataExtension.- Throws:
IllegalArgumentException- If an implementation error is found.
-
getWarnings
-
getPluginInfo
-
getTabOrder
-
getTabAnnotations
Get Tab annotations if present.- Returns:
- Collection of annotations.
-
getTabInformation
-
getMethods
Gets the extracted method utilities.- Returns:
- Method utilities for calling the code.
-
getInvalidateMethodAnnotations
Get list of invalidated methods.- Returns:
- List of annotations.
-
DataExtension.getPluginName()instead.