Class CommandParser
- java.lang.Object
-
- com.realtime.crossfire.jxclient.skin.io.CommandParser
-
public class CommandParser extends java.lang.ObjectParser for creatingGUICommandinstances from string representations.
-
-
Constructor Summary
Constructors Constructor Description CommandParser(@NotNull Dialogs dialogs, @NotNull FloorView floorView, @NotNull InventoryView inventoryView, @NotNull QuestsView questsView, @NotNull JXCSkinCache<AbstractGUIElement> definedGUIElements, @NotNull GuiFactory guiFactory, @NotNull NewCharModel newCharModel)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull GUICommandparseCommandArgs(@NotNull Args args, @Nullable AbstractGUIElement element, @NotNull java.lang.String command, @NotNull GuiStateManager guiStateManager, @NotNull CommandExecutor commandExecutor, @NotNull java.io.LineNumberReader lnr, @NotNull CommandQueue commandQueue, @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull CommandCallback commandCallback, @NotNull Macros macros)Parses and builds command arguments.
-
-
-
Constructor Detail
-
CommandParser
public CommandParser(@NotNull @NotNull Dialogs dialogs, @NotNull @NotNull FloorView floorView, @NotNull @NotNull InventoryView inventoryView, @NotNull @NotNull QuestsView questsView, @NotNull @NotNull JXCSkinCache<AbstractGUIElement> definedGUIElements, @NotNull @NotNull GuiFactory guiFactory, @NotNull @NotNull NewCharModel newCharModel)Creates a new instance.- Parameters:
dialogs- the dialogs instance to usefloorView- the floor view to useinventoryView- the inventory view to usedefinedGUIElements- the defined GUI elementsguiFactory- the global GUI factory instancenewCharModel- the global new char model instance
-
-
Method Detail
-
parseCommandArgs
@NotNull public @NotNull GUICommand parseCommandArgs(@NotNull @NotNull Args args, @Nullable @Nullable AbstractGUIElement element, @NotNull @NotNull java.lang.String command, @NotNull @NotNull GuiStateManager guiStateManager, @NotNull @NotNull CommandExecutor commandExecutor, @NotNull @NotNull java.io.LineNumberReader lnr, @NotNull @NotNull CommandQueue commandQueue, @NotNull @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull @NotNull CommandCallback commandCallback, @NotNull @NotNull Macros macros) throws java.io.IOException, JXCSkinException
Parses and builds command arguments.- Parameters:
args- the list of argumentselement- the target elementcommand- the command to parse the arguments ofguiStateManager- the gui state manager instancecommandExecutor- the command executor for executing commandslnr- the source to read more parameters fromcommandQueue- the command queue for executing commandscrossfireServerConnection- the server connection to usecommandCallback- the command callback to usemacros- the macros instance to use- Returns:
- the command arguments
- Throws:
java.io.IOException- if a syntax error occursJXCSkinException- if an element cannot be found
-
-