Class VerificationType

    • Method Detail

      • getTag

        public int getTag()
        Returns:
        the tag
      • object

        public static VerificationType object​(int classIndex)
        Creates an Object verification type with the given constant pool index.
        Parameters:
        classIndex - the constant pool index
        Returns:
        Object verification type
      • object

        public static VerificationType object​(String className,
                                              int classIndex)
        Creates an Object verification type for a class name.
        Parameters:
        className - the class name
        classIndex - the constant pool index
        Returns:
        Object verification type
      • uninitialized

        public static VerificationType uninitialized​(int newInstructionOffset)
        Creates an Uninitialized verification type for a NEW instruction.
        Parameters:
        newInstructionOffset - the bytecode offset of the NEW instruction
        Returns:
        Uninitialized verification type
      • toVerificationTypeInfo

        public abstract VerificationTypeInfo toVerificationTypeInfo()
        Converts this VerificationType to a VerificationTypeInfo for writing to class files.
        Returns:
        VerificationTypeInfo instance
      • isTwoSlot

        public boolean isTwoSlot()
        Returns true if this type takes two slots.
        Returns:
        true for long or double
      • fromDescriptor

        public static VerificationType fromDescriptor​(char c)
        Gets a verification type from a type descriptor character.
        Parameters:
        c - the descriptor character
        Returns:
        corresponding VerificationType
      • fromDescriptor

        public static VerificationType fromDescriptor​(String descriptor,
                                                      int classIndex)
        Gets a verification type from a full type descriptor.
        Parameters:
        descriptor - the type descriptor
        classIndex - the constant pool index for object types
        Returns:
        corresponding VerificationType