Package randoop.operation
Class OperationParser
java.lang.Object
randoop.operation.OperationParser
Parser for text serialization (string representation) of
Operation
s. See parse(java.lang.String)
for format details.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TypedOperation
Parses a string representing anOperation
.
-
Constructor Details
-
OperationParser
private OperationParser()
-
-
Method Details
-
parse
Parses a string representing anOperation
. The string is expected to be of the form:ID : DESCRIPTION
Where 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:
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.cons : java.util.HashMap.<init>()
For more details on the exact form of DESCRIPTION, see the different classes implementing Operation.
- Parameters:
str
- the string to be parsed- Returns:
- the operation for the given string descriptor
- Throws:
OperationParseException
- if the string does not have expected format
-