Package randoop.operation
Class TypedTermOperation
java.lang.Object
randoop.operation.TypedOperation
randoop.operation.TypedTermOperation
- All Implemented Interfaces:
Comparable<TypedOperation>
,Operation
Represents operations that have no declaring class, such as literal value, cast, or array
creation/access/assignment.
-
Nested Class Summary
Nested classes/interfaces inherited from class randoop.operation.TypedOperation
TypedOperation.RankedTypeOperation
-
Field Summary
Fields inherited from class randoop.operation.TypedOperation
compareRankedTypeOperation, inputTypes
-
Constructor Summary
ConstructorDescriptionTypedTermOperation
(CallableOperation operation, TypeTuple inputTypes, Type outputType) Creates aTypedOperation
for a given operation and input and output types. -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendCode
(List<Variable> inputVars, StringBuilder b) Appends Java text for this operation to the givenStringBuilder
, and using the given variables.Applies a capture conversion to the wildcard types of this operation, and returns a new operation with new type variables for the wildcard types.boolean
Indicates whether this operation has a type that is a wildcard type.substitute
(Substitution substitution) Applies the given substitution to the generic types in this operation, and returns a new operation with the instantiated types.Constructs a string representation of this operation that can be parsed by parse methods of the implementing types.Methods inherited from class randoop.operation.TypedOperation
checkPrestate, compareTo, createArrayCreation, createArrayElementAssignment, createCast, createGetterForField, createInitializedArrayCreation, createNonreceiverInitialization, createNullOrZeroInitializationForType, createPrimitiveInitialization, createSetterForField, equals, execute, forConstructor, forMethod, getExecutableSpecification, getInputTypes, getName, getOperation, getOutputType, getSignatureString, getTypeParameters, getValue, hashCode, isConstantField, isConstructorCall, isGeneric, isGeneric, isMessage, isMethodCall, isNonreceivingValue, isStatic, isUncheckedCast, satisfies, setExecutableSpecification, toString
-
Constructor Details
-
TypedTermOperation
TypedTermOperation(CallableOperation operation, TypeTuple inputTypes, Type outputType) Creates aTypedOperation
for a given operation and input and output types.- Parameters:
operation
- the operationinputTypes
- the input typesoutputType
- the output type
-
-
Method Details
-
hasWildcardTypes
public boolean hasWildcardTypes()Description copied from class:TypedOperation
Indicates whether this operation has a type that is a wildcard type.- Specified by:
hasWildcardTypes
in classTypedOperation
- Returns:
- true if at least one input or output type has a wildcard, false otherwise
-
appendCode
Description copied from class:TypedOperation
Appends Java text for this operation to the givenStringBuilder
, and using the given variables.- Specified by:
appendCode
in classTypedOperation
- Parameters:
inputVars
- the list of input variables for this operationb
- theStringBuilder
-
substitute
Description copied from class:TypedOperation
Applies the given substitution to the generic types in this operation, and returns a new operation with the instantiated types.- Specified by:
substitute
in classTypedOperation
- Parameters:
substitution
- the substitution- Returns:
- the operation resulting from applying the substitution to the types of this operation
-
applyCaptureConversion
Description copied from class:TypedOperation
Applies a capture conversion to the wildcard types of this operation, and returns a new operation with new type variables for the wildcard types.- Specified by:
applyCaptureConversion
in classTypedOperation
- Returns:
- the operation result from applying a capture conversion to wildcard types of this operation
-
toParsableString
Description copied from class:TypedOperation
Constructs a string representation of this operation that can be parsed by parse methods of the implementing types.- Specified by:
toParsableString
in classTypedOperation
- Returns:
- a string representation of this operation
-