public abstract class Directive
extends java.lang.Object
Directive
represents an assembly directive.Modifier and Type | Class and Description |
---|---|
static class |
Directive.Kind
Directive kind.
|
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
apply(java.math.BigInteger currentAddress,
MemoryAllocator allocator)
Applies the directive to the current address and the memory allocator.
|
Directive |
copy()
Copies the directive.
|
static java.util.List<Directive> |
copyAll(java.util.List<Directive> directives) |
abstract Directive.Kind |
getKind()
Returns the directive kind.
|
abstract java.lang.String |
getText()
Returns the string representation of the directive.
|
boolean |
needsIndent()
Checks whether an indentation is required when printing the directive.
|
java.lang.String |
toString() |
protected final Options options
public abstract Directive.Kind getKind()
public abstract java.lang.String getText()
public boolean needsIndent()
true
iff an indentation is required.public java.math.BigInteger apply(java.math.BigInteger currentAddress, MemoryAllocator allocator)
currentAddress
- the current address.allocator
- the memory allocator.public Directive copy()
public java.lang.String toString()
toString
in class java.lang.Object