Class ClassUtil


  • public final class ClassUtil
    extends java.lang.Object
    Utility class providing class information related functions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isAbstract​(int accessFlags)
      Determines whether the given access flags indicate an abstract class.
      static boolean isAbstract​(ClassInfo classInfo)
      Determines whether the given class is abstract.
      static boolean isAnnotation​(int accessFlags)
      Determines whether the given access flags indicate an annotation class.
      static boolean isAnnotation​(ClassInfo classInfo)
      Determines whether the given class is an annotation.
      static boolean isEnum​(int accessFlags)
      Determines whether the given access flags indicate an enum class.
      static boolean isEnum​(ClassInfo classInfo)
      Determines whether the given class is an enum.
      static boolean isFinal​(int accessFlags)
      Determines whether the given access flags have the final flag set.
      static boolean isFinal​(ClassInfo classInfo)
      Determines whether the given class is final.
      static boolean isInterface​(int accessFlags)
      Determines whether the given access flags indicate an interface class.
      static boolean isInterface​(ClassInfo classInfo)
      Determines whether the given class is an interface.
      static boolean isModuleInfo​(ClassInfo classInfo)
      Determines whether the given class is a module-info.
      static boolean isModuleInfo​(ClassName className)
      Determines whether the given class name indicates a module-info class.
      static boolean isPackageInfo​(ClassInfo classInfo)
      Determines whether the given class is a package-info.
      static boolean isPackageInfo​(ClassName className)
      Determines whether the given class name indicates a package-info class.
      static boolean isPrivate​(int accessFlags)
      Determines whether the given access flags have the private flag set.
      static boolean isPrivate​(ClassInfo classInfo)
      Determines whether the given class is private.
      static boolean isPublic​(int accessFlags)
      Determines whether the given access flags have the public flag set.
      static boolean isPublic​(ClassInfo classInfo)
      Determines whether the given class is public.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isPublic

        public static boolean isPublic​(ClassInfo classInfo)
        Determines whether the given class is public.
        Parameters:
        classInfo - the class info to examine.
        Returns:
        true if the class is public.
      • isPublic

        public static boolean isPublic​(int accessFlags)
        Determines whether the given access flags have the public flag set.
        Parameters:
        accessFlags - the access flags to examine.
        Returns:
        true if the public flag is set.
      • isPrivate

        public static boolean isPrivate​(ClassInfo classInfo)
        Determines whether the given class is private.
        Parameters:
        classInfo - the class info to examine.
        Returns:
        true if the class is private.
      • isPrivate

        public static boolean isPrivate​(int accessFlags)
        Determines whether the given access flags have the private flag set.
        Parameters:
        accessFlags - the access flags to examine.
        Returns:
        true if the public flag is set.
      • isFinal

        public static boolean isFinal​(ClassInfo classInfo)
        Determines whether the given class is final.
        Parameters:
        classInfo - the class info to examine.
        Returns:
        true if the class is final.
      • isFinal

        public static boolean isFinal​(int accessFlags)
        Determines whether the given access flags have the final flag set.
        Parameters:
        accessFlags - the access flags to examine.
        Returns:
        true if the final flag is set.
      • isInterface

        public static boolean isInterface​(ClassInfo classInfo)
        Determines whether the given class is an interface.
        Parameters:
        classInfo - the class info to examine.
        Returns:
        true if the class is an interface.
      • isInterface

        public static boolean isInterface​(int accessFlags)
        Determines whether the given access flags indicate an interface class.
        Parameters:
        accessFlags - the access flags to examine.
        Returns:
        true if the interface class flags are set.
      • isAbstract

        public static boolean isAbstract​(ClassInfo classInfo)
        Determines whether the given class is abstract.
        Parameters:
        classInfo - the class info to examine.
        Returns:
        true if the class is abstract.
      • isAbstract

        public static boolean isAbstract​(int accessFlags)
        Determines whether the given access flags indicate an abstract class.
        Parameters:
        accessFlags - the access flags to examine.
        Returns:
        true if the abstract class flags are set.
      • isAnnotation

        public static boolean isAnnotation​(ClassInfo classInfo)
        Determines whether the given class is an annotation.
        Parameters:
        classInfo - the class info to examine.
        Returns:
        true if the class is an annotation.
      • isAnnotation

        public static boolean isAnnotation​(int accessFlags)
        Determines whether the given access flags indicate an annotation class.
        Parameters:
        accessFlags - the access flags to examine.
        Returns:
        true if the annotation class flags are set.
      • isEnum

        public static boolean isEnum​(ClassInfo classInfo)
        Determines whether the given class is an enum.
        Parameters:
        classInfo - the class info to examine.
        Returns:
        true if the class is an enum.
      • isEnum

        public static boolean isEnum​(int accessFlags)
        Determines whether the given access flags indicate an enum class.
        Parameters:
        accessFlags - the access flags to examine.
        Returns:
        true if the enum class flags are set.
      • isPackageInfo

        public static boolean isPackageInfo​(ClassInfo classInfo)
        Determines whether the given class is a package-info.
        Parameters:
        classInfo - the class info to examine.
        Returns:
        true if the class is a package-info.
      • isPackageInfo

        public static boolean isPackageInfo​(ClassName className)
        Determines whether the given class name indicates a package-info class.
        Parameters:
        className - the class name to examine.
        Returns:
        true if the class name indicates a package-info class.
      • isModuleInfo

        public static boolean isModuleInfo​(ClassInfo classInfo)
        Determines whether the given class is a module-info.
        Parameters:
        classInfo - the class info to examine.
        Returns:
        true if the class is a module-info.
      • isModuleInfo

        public static boolean isModuleInfo​(ClassName className)
        Determines whether the given class name indicates a module-info class.
        Parameters:
        className - the class name to examine.
        Returns:
        true if the class name indicates a module-info class.