public class ClassContainer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
ftbsc.lll.mapper.data.ClassData |
data
The
ClassData for the class represented by this container. |
javax.lang.model.element.TypeElement |
elem
The
TypeElement corresponding to the class. |
| Modifier and Type | Method and Description |
|---|---|
static ClassContainer |
findOrFallback(ClassContainer fallback,
Patch p,
Find f,
ProcessorOptions options)
Finds and builds a
ClassContainer based on information contained
within Patch or a Find annotations, else returns a fallback. |
static <T extends java.lang.annotation.Annotation> |
from(T ann,
java.util.function.Function<T,java.lang.Class<?>> classFunction,
java.lang.String[] innerNames,
ProcessorOptions options)
Safely extracts a
Class from an annotation and gets its fully qualified name. |
static ClassContainer |
from(javax.lang.model.element.TypeElement cl,
ProcessorOptions options)
Safely extracts a
Class from an annotation and gets its fully qualified name. |
public final ftbsc.lll.mapper.data.ClassData data
ClassData for the class represented by this container.public final javax.lang.model.element.TypeElement elem
TypeElement corresponding to the class.
May only be null intentionally i.e. when the associated element is
an anonymous class or a child of an anonymous class.public static <T extends java.lang.annotation.Annotation> ClassContainer from(T ann, java.util.function.Function<T,java.lang.Class<?>> classFunction, java.lang.String[] innerNames, ProcessorOptions options)
Class from an annotation and gets its fully qualified name.T - the type of the annotation carrying the informationann - the annotation containing the classclassFunction - the annotation function returning the classinnerNames - a string containing the inner class name or nothingoptions - the ProcessorOptions to be usedpublic static ClassContainer from(javax.lang.model.element.TypeElement cl, ProcessorOptions options)
Class from an annotation and gets its fully qualified name.cl - the TypeElement representing the classoptions - the ProcessorOptions to be usedpublic static ClassContainer findOrFallback(ClassContainer fallback, Patch p, Find f, ProcessorOptions options)
ClassContainer based on information contained
within Patch or a Find annotations, else returns a fallback.fallback - the ClassContainer it falls back onp - the Patch annotation to get info fromf - the Find annotation to get info fromoptions - the ProcessorOptions to be usedClassContainer or the fallback if not enough information was present