Class StackUnderflowValidator

  • All Implemented Interfaces:
    Validator<Instruction>

    public class StackUnderflowValidator
    extends java.lang.Object
    implements Validator<Instruction>
    Validates the final stack level of code blocks, which should be 0 or 1.
    • Constructor Detail

      • StackUnderflowValidator

        public StackUnderflowValidator()
    • Method Detail

      • validate

        public boolean validate​(Instruction i)
        Validates object.
        Specified by:
        validate in interface Validator<Instruction>
        Parameters:
        i - the object to validate
        Returns:
        true if object is valid