Crossfire JXClient, Trunk
Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
com.realtime.crossfire.jxclient.commands.CommandExpander Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.commands.CommandExpander:
Collaboration graph

Static Public Member Functions

static Collection< CommandExecexpand (@NotNull final CharSequence commandList, @NotNull final Commands commands)
 

Private Member Functions

 CommandExpander ()
 

Static Private Attributes

static final Pattern PATTERN_SEPARATOR = Pattern.compile(" *; *")
 
static final Pattern PATTERN_SPACES = Pattern.compile(" +")
 

Detailed Description

Expands a command (or list of commands) into a sequence of Commands to execute.

Author
Andreas Kirschbaum

Definition at line 35 of file CommandExpander.java.

Constructor & Destructor Documentation

◆ CommandExpander()

com.realtime.crossfire.jxclient.commands.CommandExpander.CommandExpander ( )
private

Private constructor to prevent instantiation.

Definition at line 52 of file CommandExpander.java.

Member Function Documentation

◆ expand()

static Collection<CommandExec> com.realtime.crossfire.jxclient.commands.CommandExpander.expand ( @NotNull final CharSequence  commandList,
@NotNull final Commands  commands 
)
static

Expands a command list into a sequence of Commands to execute.

Parameters
commandListthe commands to split
commandsthe commands to use
Returns
the list of commands

Definition at line 63 of file CommandExpander.java.

References com.realtime.crossfire.jxclient.commands.Command.allArguments(), com.realtime.crossfire.jxclient.commands.CommandExpander.PATTERN_SEPARATOR, and com.realtime.crossfire.jxclient.commands.CommandExpander.PATTERN_SPACES.

Referenced by com.realtime.crossfire.jxclient.commands.CommandExpanderTest.check(), and com.realtime.crossfire.jxclient.commands.CommandExecutorImpl.executeCommand().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ PATTERN_SEPARATOR

final Pattern com.realtime.crossfire.jxclient.commands.CommandExpander.PATTERN_SEPARATOR = Pattern.compile(" *; *")
staticprivate

The Pattern for splitting command sequences.

Definition at line 41 of file CommandExpander.java.

Referenced by com.realtime.crossfire.jxclient.commands.CommandExpander.expand().

◆ PATTERN_SPACES

final Pattern com.realtime.crossfire.jxclient.commands.CommandExpander.PATTERN_SPACES = Pattern.compile(" +")
staticprivate

The Pattern for splitting commands from command arguments.

Definition at line 47 of file CommandExpander.java.

Referenced by com.realtime.crossfire.jxclient.commands.CommandExpander.expand().


The documentation for this class was generated from the following file: