would remove binary
compatibility with earlier versions.
Nested Class Summary |
class |
MessageInfo.Variables
Class representing the list of available scripting variables |
Constructor Summary |
MessageInfo(java.lang.Class<? extends Msg> c)
Constructs with a particular message class and a default name (the
class name without Msg). |
MessageInfo(java.lang.Class<? extends Msg> c,
java.lang.String name,
java.lang.String description)
Constructs with a particular message class. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageInfo
public MessageInfo(java.lang.Class<? extends Msg> c)
- Constructs with a particular message class and a default name (the
class name without Msg).
- Parameters:
c
- Class of message to which this info applies
MessageInfo
public MessageInfo(java.lang.Class<? extends Msg> c,
java.lang.String name,
java.lang.String description)
- Constructs with a particular message class.
- Parameters:
c
- Class of message to which this info appliesname
- Display name for messagedescription
- Description of message
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
- Parameters:
obj
- Comparison object
- Returns:
- True if the object is a MessageInfo referring to same class
getContextInit
public java.lang.String getContextInit()
- Messages can supply code that initialises the context if needed, to be used
when the message is received. Message will be in 'msg' variable. Default
version just calls superclass or returns nothing.
- Returns:
- Java code
getVariables
public MessageInfo.Variables getVariables()
- Returns:
- List of scripting variables automatically provided by the message
getMessageClass
public java.lang.Class<? extends Msg> getMessageClass()
- Returns:
- Class of message
getName
public final java.lang.String getName()
- Returns:
- Display name
getDescription
public final java.lang.String getDescription()
- Returns:
- Description for display, null if none
compareTo
public int compareTo(java.lang.Object obj)
- Specified by:
compareTo
in interface java.lang.Comparable<java.lang.Object>
isAbstract
public boolean isAbstract()
- Returns:
- True if messages of this type are never sent; default is
true if the message class is abstract
allowScripting
public boolean allowScripting()
- Returns:
- True if this message appears in the scripting 'events' section,
false if it (and all subclasses) doesn't; default taken from superclass
(root default is false)
listScriptingVariables
protected void listScriptingVariables(MessageInfo.Variables v)
- Adds scripting variables to a list. Default just adds variables from
superclass MessageInfo.
- Parameters:
v
- List to add variables to
getAppropriateFilters
public final FilterInfo[] getAppropriateFilters()
- Returns:
- List of message filter classes that may be appropriate for this
message type
addSubclass
public final void addSubclass(MessageInfo subclass)
- Called by system to add a subclass to this info.
- Parameters:
subclass
- Subclass info
removeSubclass
public final void removeSubclass(MessageInfo subclass)
- Called by system to remove a subclass from this info.
- Parameters:
subclass
- Subclass info
setSuperclass
public final void setSuperclass(MessageInfo superclass)
- Called by system to set the superclass for this info
- Parameters:
superclass
- Superclass info
close
public final void close()
- Called by system to close this info; removes the info from its superclass,
if any.
listAppropriateFilters
protected void listAppropriateFilters(java.util.Collection<FilterInfo> list)
- Adds permitted filters to a list. Default version just adds filters from
superclass MessageInfo, or nothing if none.
- Parameters:
list
- List to add filters to
getSubclasses
public MessageInfo[] getSubclasses()
- Returns:
- List of subclasses of this message type
getSuperclass
public MessageInfo getSuperclass()
- Returns:
- Superclass of this message type
Copyright © 2011 Samuel Marshall. All rights reserved.