at.dms.msggen
Class MessageDefinition
java.lang.Object
|
+--at.dms.msggen.MessageDefinition
- class MessageDefinition
- extends java.lang.Object
A parsed definition of a compiler message.
Constructor Summary |
MessageDefinition(java.lang.String identifier,
java.lang.String format,
java.lang.String jlsReference,
int level)
Constructs a message definition. |
Method Summary |
void |
checkIdentifiers(java.util.Map identifiers,
java.lang.String sourceFile)
Checks for duplicate identifiers. |
void |
printInterface(java.io.PrintWriter out,
java.lang.String prefix)
Prints the token definition to interface file (java) |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageDefinition
public MessageDefinition(java.lang.String identifier,
java.lang.String format,
java.lang.String jlsReference,
int level)
- Constructs a message definition.
- Parameters:
identifier
- The java identifier that is used by the compiler to refer to this
message.format
- The textual message format (with placeholders)jlsReference
- The document describing the reason for this messagelevel
- The severity level of this message
checkIdentifiers
public void checkIdentifiers(java.util.Map identifiers,
java.lang.String sourceFile)
throws MsggenError
- Checks for duplicate identifiers.
- Parameters:
identifiers
- a table of all token identifiersprefix
- the literal prefixid
- the id of the tokensourceFile
- the file where the token is defined
printInterface
public void printInterface(java.io.PrintWriter out,
java.lang.String prefix)
- Prints the token definition to interface file (java)
- Parameters:
out
- the output streamprefix
- the literal prefix