public class PrimitiveBuilder<T extends Primitive>
extends java.lang.Object
PrimitiveBuilder
class is responsible for creating and initializing
instances of nML primitives (addressing modes and operations).Constructor and Description |
---|
PrimitiveBuilder(java.lang.String name,
Primitive.Factory<T> factory,
ArgumentDecls decls)
Creates a builder for a primitive described with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
T |
build()
Returns an primitive (addressing mode or operation) created by the builder.
|
void |
setArgument(java.lang.String name,
AddressingMode value) |
LocationAccessor |
setArgument(java.lang.String name,
java.math.BigInteger value)
Initializes the specified argument with an integer value.
|
void |
setArgument(java.lang.String name,
Operation value) |
public PrimitiveBuilder(java.lang.String name, Primitive.Factory<T> factory, ArgumentDecls decls)
name
- The name of the primitive.factory
- The factory for creating the specified primitive.decls
- The table of argument declarations.public LocationAccessor setArgument(java.lang.String name, java.math.BigInteger value) throws ConfigurationException
name
- Argument name.value
- Argument integer value.ConfigurationException
public void setArgument(java.lang.String name, AddressingMode value) throws ConfigurationException
ConfigurationException
public void setArgument(java.lang.String name, Operation value) throws ConfigurationException
ConfigurationException
public T build() throws ConfigurationException
ConfigurationException
- Exception that informs of an error that occurs on attempt to
build an object due to incorrect configuration.