public class OperationParser
extends java.lang.Object
Operations. See parse(java.lang.String)
for format details.Sequence.parse(List)| Modifier | Constructor and Description |
|---|---|
private |
OperationParser() |
| Modifier and Type | Method and Description |
|---|---|
static TypedOperation |
parse(java.lang.String str)
Parses a string representing an
Operation. |
public static TypedOperation parse(java.lang.String str) throws OperationParseException
Operation. The string is expected to be of the form:
ID : DESCRIPTIONWhere ID is a string identifying the type of Operation, and DESCRIPTION represents more specifics of the Operation. For example, the following String represents the constructor for HashMap:
cons : java.util.HashMap.<init>()
A class implementing Operation should define a static field named ID that corresponds to the ID
string used when parsing. The way this parse method works is by using the ID string to
determine the specific Operation class C, and the calling C.parse(String) on the DESCRIPTION
String.
For more details on the exact form of DESCRIPTION, see the different classes implementing Operation.
str - the string to be parsedOperationParseException - if the string does not have expected format