Added new Brigadier commands related APIs for bungee/paper/cli + a few javadoc
This commit is contained in:
@@ -8,6 +8,9 @@ import java.lang.reflect.Modifier;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Class in which each wrapper classes must be registered, using {@link #initWrapper(Class, Class)}.
|
||||
*/
|
||||
public class WrapperRegistry {
|
||||
|
||||
/* package */ static Class<? extends ReflectWrapperI> getWrapperOfRuntimeClass(Class<?> runtime) {
|
||||
@@ -32,12 +35,11 @@ public class WrapperRegistry {
|
||||
private static final Map<Class<? extends ReflectWrapperI>, RegistryEntry> WRAPPER_DATA_BY_WRAPPER_CLASS = new HashMap<>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Registers a new wrapper class.
|
||||
* @param wrapper the wrapper class.
|
||||
* @param runtime the runtime class, that will be accessed reflectively by the wrapper class.
|
||||
*/
|
||||
public static void initWrapper(Class<? extends ReflectWrapperI> wrapper, Class<?> runtime) {
|
||||
Class<? extends ReflectWrapperI> concreteWrapper = wrapper;
|
||||
ReflectConstructor<? extends ReflectWrapperI> objectWrapperConstructor;
|
||||
|
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Set of class allowing applications to implement almost transparent reflection classes.
|
||||
* The goal it to implement the class, methods and fields that the application have only access through reflection, and
|
||||
* reflection call when these implementation are called.
|
||||
* Each of those reflection classes must extend {@link fr.pandacube.lib.reflect.wrapper.ReflectWrapper} (or, if it’s
|
||||
* an interface, must extend {@link fr.pandacube.lib.reflect.wrapper.ReflectWrapperI}). The implemented class wraps
|
||||
* the reflected object and redirects the method calls to them using reflection.
|
||||
*/
|
||||
package fr.pandacube.lib.reflect.wrapper;
|
Reference in New Issue
Block a user