Package org.openjdk.asmtools.jasm
Class Checker
java.lang.Object
org.openjdk.asmtools.jasm.Checker
Utility methods to verify modifiers masks for classes, interfaces, methods and fields
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkClassModifiers
(int mod, Scanner scanner) Check the modifier flags for the classstatic void
checkFieldModifiers
(ClassData classData, int mod, int pos) Check the modifier flags for the fieldstatic void
checkInnerClassModifiers
(ClassData classData, int mod, int pos) Check the modifier flags for the inner-classstatic void
checkMethodModifiers
(ClassData classData, int mod, int pos, boolean isInit, boolean isClinit) Check the modifier flags for the methodstatic boolean
validAbstractMethod
(int flags) private static boolean
validAccess
(int mod) static void
validateInterfaceMethod
(int mod, ClassData cd, int pos) static boolean
validClass
(int mod) static boolean
validField
(int flags) static boolean
validInitMethod
(int flags) static boolean
validInterface
(int mod) The only flags are allowed in interface: ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_ANNOTATIONstatic boolean
validInterfaceField
(int mod) private static boolean
validMethod
(int mod) static boolean
validNestedClass
(int flags)
-
Constructor Details
-
Checker
private Checker()
-
-
Method Details
-
validAccess
private static boolean validAccess(int mod) -
validNestedClass
public static boolean validNestedClass(int flags) -
validField
public static boolean validField(int flags) -
validMethod
private static boolean validMethod(int mod) -
validAbstractMethod
public static boolean validAbstractMethod(int flags) -
validInitMethod
public static boolean validInitMethod(int flags) -
validInterfaceField
public static boolean validInterfaceField(int mod) -
validInterface
public static boolean validInterface(int mod) The only flags are allowed in interface: ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_ANNOTATION -
validClass
public static boolean validClass(int mod) -
checkClassModifiers
Check the modifier flags for the class- Parameters:
mod
- The modifier flags being checkedscanner
- The file parser
-
checkFieldModifiers
Check the modifier flags for the field- Parameters:
classData
- The ClassData for the current classmod
- The modifier flags being checkedpos
- the position of the parser in the file
-
checkMethodModifiers
public static void checkMethodModifiers(ClassData classData, int mod, int pos, boolean isInit, boolean isClinit) Check the modifier flags for the method- Parameters:
classData
- The ClassData for the current classmod
- The modifier flags being checkedpos
- the position of the parser in the fileisInit
- is the method constructorisClinit
- is the method static initializer
-
checkInnerClassModifiers
Check the modifier flags for the inner-class- Parameters:
classData
- The ClassData for the current classmod
- The modifier flags being checkedpos
- the position of the parser in the file
-
validateInterfaceMethod
-