com.realtime.crossfire.jxclient.commands
Class Macros

java.lang.Object
  extended by com.realtime.crossfire.jxclient.commands.Macros

public class Macros
extends java.lang.Object

Manages macro expansion in command strings.


Field Summary
private  CrossfireDrawextinfoListener crossfireDrawextinfoListener
          The CrossfireDrawextinfoListener for tracking tells.
private  java.util.Map<java.lang.String,java.lang.String> expansions
          The macro expansions.
private  java.util.regex.Pattern macroPattern
          The Pattern matching macro names.
private static java.lang.String REPLY_TO
          The "reply_to" macro name.
 
Constructor Summary
Macros(CrossfireServerConnection crossfireServerConnection)
          Creates a new instance.
 
Method Summary
 java.lang.String expandMacros(java.lang.String string)
          Expands all macro references.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

crossfireDrawextinfoListener

@NotNull
private final CrossfireDrawextinfoListener crossfireDrawextinfoListener
The CrossfireDrawextinfoListener for tracking tells.


expansions

@NotNull
private final java.util.Map<java.lang.String,java.lang.String> expansions
The macro expansions. Maps macro name to macro expansion.


macroPattern

@NotNull
private final java.util.regex.Pattern macroPattern
The Pattern matching macro names.


REPLY_TO

@NotNull
private static final java.lang.String REPLY_TO
The "reply_to" macro name.

See Also:
Constant Field Values
Constructor Detail

Macros

public Macros(@NotNull
              CrossfireServerConnection crossfireServerConnection)
Creates a new instance.

Parameters:
crossfireServerConnection - the crossfire server connection to track
Method Detail

expandMacros

@NotNull
public java.lang.String expandMacros(@NotNull
                                             java.lang.String string)
Expands all macro references.

Parameters:
string - the string to expand
Returns:
the expanded string