public class CompilationImpl extends java.lang.Object implements Compilation
Modifier and Type | Field and Description |
---|---|
protected @NotNull Environment |
environment
The environment this compilation is from.
|
protected @Nullable Instruction |
instruction
The instruction of this compilation.
|
protected @NotNull java.util.Map<java.lang.String,java.lang.Object> |
meta
The additional meta-data of this compilation.
|
protected @NotNull Tree |
root
The root tree of this compilation.
|
Constructor and Description |
---|
CompilationImpl(@NotNull Environment environment,
@NotNull Tree root)
Construct a new compilation with the given
root tree to be its root tree. |
Modifier and Type | Method and Description |
---|---|
@NotNull Environment |
getEnvironment()
Return the environment this compilation is on.
|
@Nullable Instruction |
getInstruction()
Return the instruction set for this compilation.
|
@NotNull java.util.Map<java.lang.String,java.lang.Object> |
getMeta()
Returns the meta-data map of this compilation.
|
@NotNull Tree |
getRootTree()
Return the root tree of this compilation.
|
void |
setInstruction(@NotNull Instruction instruction)
Set the intrusion of the compilation to be the given
instruction . |
@NotNull protected final @NotNull Environment environment
@NotNull protected final @NotNull java.util.Map<java.lang.String,java.lang.Object> meta
@NotNull protected final @NotNull Tree root
@Nullable protected @Nullable Instruction instruction
public CompilationImpl(@NotNull @NotNull Environment environment, @NotNull @NotNull Tree root)
root
tree to be its root tree.environment
- the environment for the constructed compilation.root
- the root tree for the constructed compilation.java.lang.NullPointerException
- if the given tree
is null.@NotNull public @NotNull Environment getEnvironment()
Compilation
getEnvironment
in interface Compilation
@Nullable public @Nullable Instruction getInstruction()
Compilation
getInstruction
in interface Compilation
@NotNull public @NotNull java.util.Map<java.lang.String,java.lang.Object> getMeta()
Compilation
getMeta
in interface Compilation
@NotNull public @NotNull Tree getRootTree()
Compilation
getRootTree
in interface Compilation
public void setInstruction(@NotNull @NotNull Instruction instruction)
Compilation
instruction
. It is
expected pass an instruction resultant from compiling this compilation with a real
compiler. But, there is no additional checks to validate that. So, be nice and
follow the rules. Please?setInstruction
in interface Compilation
instruction
- the instruction to be set for this compilation.