public final class AnnotationUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <A extends java.lang.annotation.Annotation> |
getAnnotatedClasses(net.minecraftforge.fml.common.discovery.ASMDataTable table,
java.lang.Class<A> annotation)
Gets all classes annotated with the annotation class.
|
static <A extends java.lang.annotation.Annotation> |
getAnnotatedFields(java.util.Collection<java.lang.Class<?>> collection,
java.lang.Class<A> class1)
Gets all fields annotated with the annotation class.
|
static <T,A extends java.lang.annotation.Annotation> |
getAnnotations(net.minecraftforge.fml.common.discovery.ASMDataTable table,
java.lang.Class<A> annotation,
java.lang.Class<T> instance)
Finds all classes annotated with the annotation class.
|
static <A extends java.lang.annotation.Annotation> |
getData(net.minecraftforge.fml.common.discovery.ASMDataTable table,
java.lang.Class<A> annotation)
Gets the ASMData for all classes annotated with the annotation class.
|
public static <A extends java.lang.annotation.Annotation> java.util.Set<net.minecraftforge.fml.common.discovery.ASMDataTable.ASMData> getData(net.minecraftforge.fml.common.discovery.ASMDataTable table,
java.lang.Class<A> annotation)
table - The ASMDataTable. This is generated from forge an can be accessed from the
initialization events.annotation - The annotation to search for.public static <A extends java.lang.annotation.Annotation> java.util.List<net.minecraft.util.Tuple<java.lang.Class<?>,A>> getAnnotatedClasses(net.minecraftforge.fml.common.discovery.ASMDataTable table,
java.lang.Class<A> annotation)
table - The ASMDataTable. This is generated from forge and can be accessed from the
initialization events.annotation - The annotation to search for.public static <A extends java.lang.annotation.Annotation> java.util.List<java.lang.reflect.Field> getAnnotatedFields(java.util.Collection<java.lang.Class<?>> collection,
java.lang.Class<A> class1)
collection - The list of classes to search through.class1 - The annotation to search for.public static <T,A extends java.lang.annotation.Annotation> java.util.Map<T,A> getAnnotations(net.minecraftforge.fml.common.discovery.ASMDataTable table,
java.lang.Class<A> annotation,
java.lang.Class<T> instance)
table - The ASMDataTable created by Forge. You can get this from most of the main
mod loading stage events.annotation - The class of the annotation you're using to search for.instance - The class of the thing you're trying to construct. This should be a
shared interface, or parent class.