net.forthecrown.grenadier.annotations.VariableInitializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grenadier-annotations Show documentation
Show all versions of grenadier-annotations Show documentation
Annotation-based command support for Grenadier
package net.forthecrown.grenadier.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotation that marks methods that initialize local variables during command
* parsing and compilation.
*
* Use example:
*
* @CommandData("""
* // Data
* """)
* public class Example {
*
* @VariableInitializer
* void initVariables(Map<String, Object> variables) {
* variables.put("var1", "value");
* }
* }
*
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface VariableInitializer {
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy