mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-04 22:41:41 +01:00
Method names used as provider identifiers
This commit is contained in:
parent
245c083237
commit
a52954dbb8
@ -36,6 +36,10 @@ package com.djrapitops.plan.extension;
|
||||
* {@link Group group} - Provided group the data is about (In case a group needs additional information)
|
||||
* nothing - The data is interpreted to be about the server.
|
||||
* <p>
|
||||
* The name of the method will be used as an identifier in the database, so that a single provider does not duplicate entries.
|
||||
* Only first 50 characters of the method name are stored.
|
||||
* If you need to change a method name add a class annotation with the old method name: {@link com.djrapitops.plan.extension.annotation.InvalidateMethod}
|
||||
* <p>
|
||||
* Some additional annotations are available for controlling appearance of the results:
|
||||
* {@link com.djrapitops.plan.extension.annotation.Conditional} A {@code boolean} returned by {@link com.djrapitops.plan.extension.annotation.BooleanProvider} has to be {@code true} for this method to be called.
|
||||
* {@link com.djrapitops.plan.extension.annotation.Tab} The value of this provider should be placed on a tab with a specific name
|
||||
|
@ -0,0 +1,34 @@
|
||||
package com.djrapitops.plan.extension.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Annotation used to invalidate old method values.
|
||||
* <p>
|
||||
* The name of the methods are used as an identifier in the database, so that a single provider does not duplicate entries.
|
||||
* Only first 50 characters of the method name are stored.
|
||||
* If you need to change a method name add this class annotation with the old method name.
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
@Repeatable(InvalidateMethod.Multiple.class)
|
||||
public @interface InvalidateMethod {
|
||||
|
||||
/**
|
||||
* Name of the old method, values of which should be removed from the database.
|
||||
*
|
||||
* @return Name of the old method, case sensitive. Only first 50 characters are used.
|
||||
*/
|
||||
String value();
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
@interface Multiple {
|
||||
|
||||
InvalidateMethod[] value();
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user