All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.forthecrown.grenadier.annotations.VariableInitializer Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
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