Class ClassContainer


  • public class ClassContainer
    extends java.lang.Object
    Container for information about a class. Used internally for efficiency reasons.
    Since:
    0.5.0
    • Field Summary

      Fields 
      Modifier and Type Field 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.
    • Field Detail

      • data

        public final ftbsc.lll.mapper.data.ClassData data
        The ClassData for the class represented by this container.
      • elem

        public final javax.lang.model.element.TypeElement elem
        The 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.
    • Method Detail

      • from

        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)
        Safely extracts a Class from an annotation and gets its fully qualified name.
        Type Parameters:
        T - the type of the annotation carrying the information
        Parameters:
        ann - the annotation containing the class
        classFunction - the annotation function returning the class
        innerNames - a string containing the inner class name or nothing
        options - the ProcessorOptions to be used
        Returns:
        the fully qualified name of the given class
        Since:
        0.5.0
      • from

        public static ClassContainer from​(javax.lang.model.element.TypeElement cl,
                                          ProcessorOptions options)
        Safely extracts a Class from an annotation and gets its fully qualified name.
        Parameters:
        cl - the TypeElement representing the class
        options - the ProcessorOptions to be used
        Returns:
        the fully qualified name of the given class
        Since:
        0.6.0