Class Checker

java.lang.Object
org.openjdk.asmtools.jasm.Checker

public class Checker extends Object
Utility methods to verify modifiers masks for classes, interfaces, methods and fields
  • 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

      public static void checkClassModifiers(int mod, Scanner scanner)
      Check the modifier flags for the class
      Parameters:
      mod - The modifier flags being checked
      scanner - The file parser
    • checkFieldModifiers

      public static void checkFieldModifiers(ClassData classData, int mod, int pos)
      Check the modifier flags for the field
      Parameters:
      classData - The ClassData for the current class
      mod - The modifier flags being checked
      pos - 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 class
      mod - The modifier flags being checked
      pos - the position of the parser in the file
      isInit - is the method constructor
      isClinit - is the method static initializer
    • checkInnerClassModifiers

      public static void checkInnerClassModifiers(ClassData classData, int mod, int pos)
      Check the modifier flags for the inner-class
      Parameters:
      classData - The ClassData for the current class
      mod - The modifier flags being checked
      pos - the position of the parser in the file
    • validateInterfaceMethod

      public static void validateInterfaceMethod(int mod, ClassData cd, int pos)