Class ClassInfo


  • public final class ClassInfo
    extends Object
    Computes class information to determine data key name/value pairs associated with the class.

    Implementation is thread-safe.

    Since:
    1.0
    Author:
    Yaniv Inbar
    • Method Detail

      • of

        public static ClassInfo of​(Class<?> underlyingClass)
        Returns the class information for the given underlying class.
        Parameters:
        underlyingClass - underlying class or null for null result
        Returns:
        class information or null for null input
      • of

        public static ClassInfo of​(Class<?> underlyingClass,
                                   boolean ignoreCase)
        Returns the class information for the given underlying class.
        Parameters:
        underlyingClass - underlying class or null for null result
        ignoreCase - whether field names are case sensitive
        Returns:
        class information or null for null input
        Since:
        1.10
      • getUnderlyingClass

        public Class<?> getUnderlyingClass()
        Returns the underlying class.
        Since:
        1.4
      • getIgnoreCase

        public final boolean getIgnoreCase()
        Returns whether field names are case sensitive.
        Since:
        1.10
      • isEnum

        public boolean isEnum()
        Returns the underlying class is an enum.
        Since:
        1.4
      • getNames

        public Collection<String> getNames()
        Returns an unmodifiable sorted set (with any possible null member first) of names.
      • getFieldInfos

        public Collection<FieldInfo> getFieldInfos()
        Returns an unmodifiable collection of the FieldInfos for this class, without any guarantee of order.

        If you need sorted order, instead use getNames() with getFieldInfo(String).

        Since:
        1.16