Package ru.ispras.microtesk.model
Class IsaPrimitiveBuilder
- java.lang.Object
-
- ru.ispras.microtesk.model.IsaPrimitiveBuilder
-
public class IsaPrimitiveBuilder extends java.lang.Object
TheIsaPrimitiveBuilder
class is responsible for creating and initializing instances of nML primitives (addressing modes and operations).
-
-
Constructor Summary
Constructors Constructor Description IsaPrimitiveBuilder(IsaPrimitiveInfoAnd info)
Creates a builder for a primitive described with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsaPrimitive
build()
Returns an primitive (addressing mode or operation) created by the builder.LocationAccessor
setArgument(java.lang.String name, java.math.BigInteger value)
Initializes the specified immediate argument with an integer value.void
setArgument(java.lang.String name, IsaPrimitive value)
void
setLabelReference(LabelReference labelReference)
-
-
-
Constructor Detail
-
IsaPrimitiveBuilder
public IsaPrimitiveBuilder(IsaPrimitiveInfoAnd info)
Creates a builder for a primitive described with the specified parameters.- Parameters:
info
- Information on the primitive to be built.
-
-
Method Detail
-
setArgument
public LocationAccessor setArgument(java.lang.String name, java.math.BigInteger value) throws ConfigurationException
Initializes the specified immediate argument with an integer value.- Parameters:
name
- Argument name.value
- Argument integer value.- Returns:
- Accessor for the argument value.
- Throws:
ConfigurationException
- if the specified argument is not an immediate value.
-
setArgument
public void setArgument(java.lang.String name, IsaPrimitive value) throws ConfigurationException
- Throws:
ConfigurationException
-
setLabelReference
public void setLabelReference(LabelReference labelReference) throws ConfigurationException
- Throws:
ConfigurationException
-
build
public IsaPrimitive build() throws ConfigurationException
Returns an primitive (addressing mode or operation) created by the builder.- Returns:
- The created and initialized primitive (addressing mode or operation).
- Throws:
ConfigurationException
- Exception that informs of an error that occurs on attempt to build an object due to incorrect configuration.
-
-