Class GUICommandFactoryImpl
- java.lang.Object
-
- com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl
-
- All Implemented Interfaces:
GUICommandFactory
public class GUICommandFactoryImpl extends java.lang.Object implements GUICommandFactory
Factory for creatingGUICommandinstances from string representation.
-
-
Constructor Summary
Constructors Constructor Description GUICommandFactoryImpl(@NotNull CommandCallback commandCallback, @NotNull CommandExecutor commandExecutor, @NotNull Macros macros)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull GUICommandcreateCommand(@NotNull java.lang.String commandString)Creates a newGUICommandinstance from string representation.GUICommandcreateCommandDecode(@NotNull java.lang.String encodedCommandString)Creates a newGUICommandinstance from string representation.@NotNull java.lang.Stringdecode(@NotNull java.lang.String command)Decodes a key binding if necessary.@NotNull java.lang.Stringencode(@NotNull java.lang.String command)Encodes a key binding if necessary.
-
-
-
Constructor Detail
-
GUICommandFactoryImpl
public GUICommandFactoryImpl(@NotNull @NotNull CommandCallback commandCallback, @NotNull @NotNull CommandExecutor commandExecutor, @NotNull @NotNull Macros macros)Creates a new instance.- Parameters:
commandCallback- the command callback to usecommandExecutor- the command executor instance to usemacros- the macros instance to use
-
-
Method Detail
-
createCommandDecode
public GUICommand createCommandDecode(@NotNull @NotNull java.lang.String encodedCommandString)
Creates a newGUICommandinstance from string representation.- Specified by:
createCommandDecodein interfaceGUICommandFactory- Parameters:
encodedCommandString- the command string representation- Returns:
- the new command instance
-
createCommand
@NotNull public @NotNull GUICommand createCommand(@NotNull @NotNull java.lang.String commandString)
Creates a newGUICommandinstance from string representation.- Specified by:
createCommandin interfaceGUICommandFactory- Parameters:
commandString- the command string representation- Returns:
- the new command instance
-
encode
@NotNull public @NotNull java.lang.String encode(@NotNull @NotNull java.lang.String command)Encodes a key binding if necessary.- Specified by:
encodein interfaceGUICommandFactory- Parameters:
command- the key binding- Returns:
- the encoded key binding
-
decode
@NotNull public @NotNull java.lang.String decode(@NotNull @NotNull java.lang.String command)Decodes a key binding if necessary.- Specified by:
decodein interfaceGUICommandFactory- Parameters:
command- the key binding- Returns:
- the decoded key binding
-
-