- java.lang.Object
-
- de.carne.mcd.jvmdecoder.classfile.ClassUtil
-
public final class ClassUtil extends java.lang.ObjectUtility class providing class information related functions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisAbstract(int accessFlags)Determines whether the given access flags indicate an abstract class.static booleanisAbstract(ClassInfo classInfo)Determines whether the given class is abstract.static booleanisAnnotation(int accessFlags)Determines whether the given access flags indicate an annotation class.static booleanisAnnotation(ClassInfo classInfo)Determines whether the given class is an annotation.static booleanisEnum(int accessFlags)Determines whether the given access flags indicate an enum class.static booleanisEnum(ClassInfo classInfo)Determines whether the given class is an enum.static booleanisFinal(int accessFlags)Determines whether the given access flags have the final flag set.static booleanisFinal(ClassInfo classInfo)Determines whether the given class is final.static booleanisInterface(int accessFlags)Determines whether the given access flags indicate an interface class.static booleanisInterface(ClassInfo classInfo)Determines whether the given class is an interface.static booleanisModuleInfo(ClassInfo classInfo)Determines whether the given class is a module-info.static booleanisModuleInfo(ClassName className)Determines whether the given class name indicates a module-info class.static booleanisPackageInfo(ClassInfo classInfo)Determines whether the given class is a package-info.static booleanisPackageInfo(ClassName className)Determines whether the given class name indicates a package-info class.static booleanisPrivate(int accessFlags)Determines whether the given access flags have the private flag set.static booleanisPrivate(ClassInfo classInfo)Determines whether the given class is private.static booleanisPublic(int accessFlags)Determines whether the given access flags have the public flag set.static booleanisPublic(ClassInfo classInfo)Determines whether the given class is public.
-
-
-
Method Detail
-
isPublic
public static boolean isPublic(ClassInfo classInfo)
Determines whether the given class is public.- Parameters:
classInfo- the class info to examine.- Returns:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif the class name indicates a module-info class.
-
-