Enum Reflection

java.lang.Object
java.lang.Enum<Reflection>
xmlparser.utils.Reflection
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Reflection>, java.lang.constant.Constable

public enum Reflection
extends java.lang.Enum<Reflection>
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  Reflection.ClassType  
    static class  Reflection.FieldType  

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.util.Map<java.lang.Class<?>,​java.lang.Class<?>> PRIMITIVE_TO_OBJECT  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.reflect.Field determineTypeOfFields​(java.lang.Class<?> clazz, java.lang.Object o, java.util.List<java.lang.reflect.Field> attributes, java.util.List<java.lang.reflect.Field> childNodes)  
    static java.lang.Class<?> findAbstractType​(XmlAbstractClass annotation, XmlElement node)  
    static java.lang.Object invokeFieldDeserializer​(java.lang.reflect.Field f, XmlElement element)  
    static boolean isAbstract​(java.lang.reflect.Field f)  
    static boolean isList​(java.lang.Class<?> c)  
    static boolean isMap​(java.lang.Class<?> c)  
    static boolean isSet​(java.lang.Class<?> c)  
    static boolean isSimple​(java.lang.Class<?> c)  
    static boolean isWrapped​(java.lang.reflect.Field f)  
    static java.util.List<java.lang.reflect.Field> listFields​(java.lang.Class<?> type)  
    static java.util.List<java.lang.reflect.Field> listFields​(java.util.List<java.lang.reflect.Field> fields, java.lang.Class<?> type)  
    static void setField​(java.lang.reflect.Field field, java.lang.Object object, java.lang.Object value)  
    static java.lang.Class<?> toClassOfCollection​(java.lang.reflect.Field f)  
    static java.lang.Class<?> toClassOfMapKey​(java.lang.reflect.ParameterizedType type)  
    static java.lang.Class<?> toClassOfMapValue​(java.lang.reflect.ParameterizedType type)  
    static Reflection.ClassType toClassType​(java.lang.Class<?> c, Interfaces.AccessSerializers s)  
    static Reflection.FieldType toFieldType​(java.lang.reflect.Field f)  
    static java.lang.String toName​(java.lang.Class<?> o)  
    static java.lang.String toName​(java.lang.reflect.Field field)  
    static <T> java.lang.Class<T> toObjectClass​(java.lang.Class<T> clazz)  
    static java.lang.String toWrappedName​(java.lang.reflect.Field f)  
    static Reflection valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static Reflection[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • PRIMITIVE_TO_OBJECT

      public static final java.util.Map<java.lang.Class<?>,​java.lang.Class<?>> PRIMITIVE_TO_OBJECT
  • Method Details

    • values

      public static Reflection[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Reflection valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • determineTypeOfFields

      public static java.lang.reflect.Field determineTypeOfFields​(java.lang.Class<?> clazz, java.lang.Object o, java.util.List<java.lang.reflect.Field> attributes, java.util.List<java.lang.reflect.Field> childNodes) throws java.lang.IllegalAccessException
      Throws:
      java.lang.IllegalAccessException
    • toFieldType

      public static Reflection.FieldType toFieldType​(java.lang.reflect.Field f)
    • toClassType

      public static Reflection.ClassType toClassType​(java.lang.Class<?> c, Interfaces.AccessSerializers s)
    • listFields

      public static java.util.List<java.lang.reflect.Field> listFields​(java.lang.Class<?> type)
    • listFields

      public static java.util.List<java.lang.reflect.Field> listFields​(java.util.List<java.lang.reflect.Field> fields, java.lang.Class<?> type)
    • isSimple

      public static boolean isSimple​(java.lang.Class<?> c)
    • isList

      public static boolean isList​(java.lang.Class<?> c)
    • isSet

      public static boolean isSet​(java.lang.Class<?> c)
    • isMap

      public static boolean isMap​(java.lang.Class<?> c)
    • isWrapped

      public static boolean isWrapped​(java.lang.reflect.Field f)
    • toWrappedName

      public static java.lang.String toWrappedName​(java.lang.reflect.Field f)
    • isAbstract

      public static boolean isAbstract​(java.lang.reflect.Field f)
    • findAbstractType

      public static java.lang.Class<?> findAbstractType​(XmlAbstractClass annotation, XmlElement node)
    • toName

      public static java.lang.String toName​(java.lang.Class<?> o)
    • toName

      public static java.lang.String toName​(java.lang.reflect.Field field)
    • toClassOfCollection

      public static java.lang.Class<?> toClassOfCollection​(java.lang.reflect.Field f)
    • toClassOfMapKey

      public static java.lang.Class<?> toClassOfMapKey​(java.lang.reflect.ParameterizedType type)
    • toClassOfMapValue

      public static java.lang.Class<?> toClassOfMapValue​(java.lang.reflect.ParameterizedType type)
    • toObjectClass

      public static <T> java.lang.Class<T> toObjectClass​(java.lang.Class<T> clazz)
    • invokeFieldDeserializer

      public static java.lang.Object invokeFieldDeserializer​(java.lang.reflect.Field f, XmlElement element)
    • setField

      public static void setField​(java.lang.reflect.Field field, java.lang.Object object, java.lang.Object value)