Package randoop.condition.specification
Class Identifiers
java.lang.Object
randoop.condition.specification.Identifiers
Contains the identifiers used in the guards and properties of the specifications in a
OperationSpecification
. The order of the names is significant, but the names need not match the
actual declaration of the method.
The JSON serialization of this class is used to read the specifications for an operation given
using the --specifications
command-line option. The JSON should include a JSON object
labeled by the name of each field of this class, as in
{ "receiverName": "receiver", "parameters": [ "signalValue" ], "returnName": "result" }
Names for the receiver and return value are optional; they default to "receiver" and "result".
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreate aIdentifiers
object with no parameters and the default identifiers for the receiver and return value.Identifiers
(String receiverName, List<String> parameters, String returnName) Create anIdentifiers
object with the given names.Identifiers
(List<String> parameters) Create anIdentifiers
object with the given parameter names and the default identifiers for the receiver and return value. -
Method Summary
Modifier and TypeMethodDescriptionReturns an identifier name that occurs more than once in thisIdentifiers
, or null if there are no duplicate names.boolean
Returns the parameter names in thisIdentifiers
object.Returns the identifier for the receiver object in thisIdentifiers
object.Returns the identifier for the return value in thisIdentifiers
object.int
hashCode()
toString()
-
Field Details
-
receiverName
The receiver name. -
parameters
The formal parameter names (not including the receiver). -
returnName
The return value identifier.
-
-
Constructor Details
-
Identifiers
Create anIdentifiers
object with the given names.- Parameters:
receiverName
- the receiver nameparameters
- the list of identifiers for the operation formal parametersreturnName
- the return name
-
Identifiers
Create anIdentifiers
object with the given parameter names and the default identifiers for the receiver and return value.- Parameters:
parameters
- the list of identifiers for the operation parameters
-
Identifiers
public Identifiers()Create aIdentifiers
object with no parameters and the default identifiers for the receiver and return value.
-
-
Method Details
-
getReceiverName
Returns the identifier for the receiver object in thisIdentifiers
object.- Returns:
- the receiver name
-
getParameterNames
Returns the parameter names in thisIdentifiers
object.- Returns:
- the parameter names
-
getReturnName
Returns the identifier for the return value in thisIdentifiers
object.- Returns:
- the return value identifier
-
duplicateName
Returns an identifier name that occurs more than once in thisIdentifiers
, or null if there are no duplicate names.- Returns:
- a name occurs more than once, or null if there are no duplicate names
-
equals
-
hashCode
public int hashCode() -
toString
-