Package randoop.operation
Class TypedClassOperationWithCast
java.lang.Object
randoop.operation.TypedOperation
randoop.operation.TypedClassOperation
randoop.operation.TypedClassOperationWithCast
- All Implemented Interfaces:
Comparable<TypedOperation>
,Operation
Represents a method with a return type that is a type variable that must be instantiated, and for
which execution performs a cast to the instantiating type to emulate handling of casts that are
not done in reflection.
-
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
ConstructorDescriptionTypedClassOperationWithCast
(CallableOperation op, ClassOrInterfaceType declaringType, TypeTuple inputTypes, Type outputType) TypedClassOperationWithCast
(CallableOperation op, ClassOrInterfaceType declaringType, TypeTuple inputTypes, Type outputType, ExecutableSpecification execSpec) -
Method Summary
Modifier and TypeMethodDescriptionApplies a capture conversion to the wildcard types of this operation, and returns a new operation with new type variables for the wildcard types.Performs this operation using the array of input values.substitute
(Substitution substitution) Applies the given substitution to the generic types in this operation, and returns a new operation with the instantiated types.Methods inherited from class randoop.operation.TypedClassOperation
appendCode, equals, getDeclaringType, getFullyQualifiedSignature, getName, getOperationForType, getRawSignature, getTypeParameters, getUnqualifiedBinaryName, hashCode, hasWildcardTypes, toParsableString, toString
Methods inherited from class randoop.operation.TypedOperation
checkPrestate, compareTo, createArrayCreation, createArrayElementAssignment, createCast, createGetterForField, createInitializedArrayCreation, createNonreceiverInitialization, createNullOrZeroInitializationForType, createPrimitiveInitialization, createSetterForField, forConstructor, forMethod, getExecutableSpecification, getInputTypes, getOperation, getOutputType, getSignatureString, getValue, isConstantField, isConstructorCall, isGeneric, isGeneric, isMessage, isMethodCall, isNonreceivingValue, isStatic, isUncheckedCast, satisfies, setExecutableSpecification
-
Constructor Details
-
TypedClassOperationWithCast
TypedClassOperationWithCast(CallableOperation op, ClassOrInterfaceType declaringType, TypeTuple inputTypes, Type outputType) -
TypedClassOperationWithCast
TypedClassOperationWithCast(CallableOperation op, ClassOrInterfaceType declaringType, TypeTuple inputTypes, Type outputType, ExecutableSpecification execSpec)
-
-
Method Details
-
substitute
Description copied from class:TypedClassOperation
Applies the given substitution to the generic types in this operation, and returns a new operation with the instantiated types.Applies the substitution to the declaring type, all input types, and the output type.
- Overrides:
substitute
in classTypedClassOperation
- 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.- Overrides:
applyCaptureConversion
in classTypedClassOperation
- Returns:
- the operation result from applying a capture conversion to wildcard types of this operation
-
execute
Performs this operation using the array of input values. Returns the results of execution as an ResultOrException object and can output results to specified PrintStream.Performs cast to output type of this operation to ensure that any
ClassCastException
that would be thrown in JVM execution is also thrown.- Overrides:
execute
in classTypedOperation
- Parameters:
input
- array containing appropriate inputs to operation- Returns:
- results of executing this statement
-