Class ClassUtils

java.lang.Object
org.neo4j.ogm.support.ClassUtils

public final class ClassUtils extends Object
Author:
Michael J. Simons
  • Method Details

    • isEnum

      public static boolean isEnum(Class<?> clazz)
      See https://github.com/neo4j/neo4j-ogm/issues/643. An enum instance that overrides methods of the enum itself is realized as an anonymous inner class for which Class.isEnum() returns false.
      Parameters:
      clazz - The class to check whether it is an enum or not.
      Returns:
      True, if clazz is an enum.
    • isEnum

      public static boolean isEnum(Type type)
      Parameters:
      type - The type to check whether it is an enum or not.
      Returns:
      True, if the type refers to an enum instance.
      See Also:
    • isEnum

      public static boolean isEnum(Object object)
      Parameters:
      object -
      Returns:
      True, if the object is an enum instance.
      See Also: