|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleafchat.core.api.MessageInfo.Variables
public class MessageInfo.Variables
Class representing the list of available scripting variables
Constructor Summary | |
---|---|
MessageInfo.Variables()
|
Method Summary | |
---|---|
void |
add(java.lang.String variable)
Add a variable to the list. |
void |
add(java.lang.String variable,
java.lang.Class<?> type,
java.lang.String code)
Adds a custom variable to the list. |
java.lang.String |
getDefinition(java.lang.String variable)
Obtains the code needed to define a variable, for example: "String myVariable=msg.getMyVariable();" |
java.lang.String[] |
getNames()
|
java.lang.Class<?> |
getType(java.lang.String variable)
Obtains the type of a named variable. |
void |
remove(java.lang.String variable)
Removes a variable from the list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageInfo.Variables()
Method Detail |
---|
public void add(java.lang.String variable)
variable
- Variable name
BugException
- If the method isn't properly definedpublic void add(java.lang.String variable, java.lang.Class<?> type, java.lang.String code)
variable
- Variable nametype
- Type (should be int.class or String.class)code
- Code to define variable, which can assume the existance
of a msg variable of the message type, e.g. "int frog=msg.getFrog();"public java.lang.String[] getNames()
public java.lang.String getDefinition(java.lang.String variable)
variable
- Variable
public java.lang.Class<?> getType(java.lang.String variable)
variable
- Variablename
BugException
- If variable method does not exist or there's something
wrong with itpublic void remove(java.lang.String variable)
variable
- Variable to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |