Class FactorySingleAddressParameterInstructionParser
java.lang.Object
dev.zemco.codegame.compilation.parsing.AbstractNamedParametrizedInstructionParser
dev.zemco.codegame.compilation.parsing.FactorySingleParameterInstructionParser
dev.zemco.codegame.compilation.parsing.FactorySingleIntegerParameterInstructionParser
dev.zemco.codegame.compilation.parsing.FactorySingleAddressParameterInstructionParser
- All Implemented Interfaces:
IInstructionParser
public class FactorySingleAddressParameterInstructionParser
extends FactorySingleIntegerParameterInstructionParser
Parses a named
instruction with a single address parameter by requesting it
from a backing factory.
The backing factory cannot be modified after construction.
This class is implemented by wrapping the given backing factory with a validating integer based one.
- Author:
- Erik Zemčík
-
Nested Class Summary
Nested classes/interfaces inherited from class dev.zemco.codegame.compilation.parsing.FactorySingleIntegerParameterInstructionParser
FactorySingleIntegerParameterInstructionParser.IIntegerInstructionFactoryNested classes/interfaces inherited from class dev.zemco.codegame.compilation.parsing.FactorySingleParameterInstructionParser
FactorySingleParameterInstructionParser.IStringInstructionFactory -
Constructor Summary
ConstructorsConstructorDescriptionFactorySingleAddressParameterInstructionParser(String instructionName, FactorySingleIntegerParameterInstructionParser.IIntegerInstructionFactory instructionFactory) Creates an instance ofFactorySingleAddressParameterInstructionParserthat parsesinstructionswith the given name by requesting them from the given backingfactory. -
Method Summary
Methods inherited from class dev.zemco.codegame.compilation.parsing.FactorySingleParameterInstructionParser
parseInstructionFromParametersMethods inherited from class dev.zemco.codegame.compilation.parsing.AbstractNamedParametrizedInstructionParser
checkParameterFixedCount, parseInstruction
-
Constructor Details
-
FactorySingleAddressParameterInstructionParser
public FactorySingleAddressParameterInstructionParser(String instructionName, FactorySingleIntegerParameterInstructionParser.IIntegerInstructionFactory instructionFactory) Creates an instance ofFactorySingleAddressParameterInstructionParserthat parsesinstructionswith the given name by requesting them from the given backingfactory.- Parameters:
instructionName- name of the rawinstructioninstructionFactory- source of parsedinstructions- Throws:
IllegalArgumentException- ifinstructionNameisnullor empty or ifinstructionFactoryisnull
-