Class Directive

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Directive.Kind
      Directive kind.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Options options  
    • Field Detail

      • options

        protected final Options options
    • Method Detail

      • copyAll

        public static java.util.List<Directive> copyAll​(java.util.List<Directive> directives)
      • getKind

        public abstract Directive.Kind getKind()
        Returns the directive kind.
        Returns:
        the directive kind.
      • getText

        public abstract java.lang.String getText()
        Returns the string representation of the directive.
        Returns:
        the directive text.
      • needsIndent

        public boolean needsIndent()
        Checks whether an indentation is required when printing the directive.
        Returns:
        true iff an indentation is required.
      • apply

        public java.math.BigInteger apply​(java.math.BigInteger currentAddress,
                                          MemoryAllocator allocator)
        Applies the directive to the current address and the memory allocator.
        Parameters:
        currentAddress - the current address.
        allocator - the memory allocator.
        Returns:
        the current address.
      • copy

        public Directive copy()
        Copies the directive.
        Returns:
        a copy of the directive.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object