Package randoop.field
Class FieldParser
java.lang.Object
randoop.field.FieldParser
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static Field
fieldForName
(Class<?> type, String fieldName) Searches the field list of a class for a field that has the given name.static AccessibleField
Recognizes a field from a string description, using class and field name tokens, and returns aAccessibleField
object.
-
Constructor Details
-
FieldParser
private FieldParser()
-
-
Method Details
-
parse
public static AccessibleField parse(String descr, @ClassGetName String classname, String fieldname) throws OperationParseException Recognizes a field from a string description, using class and field name tokens, and returns aAccessibleField
object.- Parameters:
descr
- the full string descriptionclassname
- the name of the field's declaring classfieldname
- the name of the field- Returns:
- the
AccessibleField
for the given class and field name - Throws:
OperationParseException
- if either name is malformed or incorrect
-
fieldForName
Searches the field list of a class for a field that has the given name.- Parameters:
type
- class objectfieldName
- field name for which to search the class- Returns:
- field of the class with the given name
-