Class TypedTermOperation

java.lang.Object
randoop.operation.TypedOperation
randoop.operation.TypedTermOperation
All Implemented Interfaces:
Comparable<TypedOperation>, Operation

class TypedTermOperation extends TypedOperation
Represents operations that have no declaring class, such as literal value, cast, or array creation/access/assignment.
  • Constructor Details

    • TypedTermOperation

      TypedTermOperation(CallableOperation operation, TypeTuple inputTypes, Type outputType)
      Creates a TypedOperation for a given operation and input and output types.
      Parameters:
      operation - the operation
      inputTypes - the input types
      outputType - 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 class TypedOperation
      Returns:
      true if at least one input or output type has a wildcard, false otherwise
    • appendCode

      public void appendCode(List<Variable> inputVars, StringBuilder b)
      Description copied from class: TypedOperation
      Appends Java text for this operation to the given StringBuilder, and using the given variables.
      Specified by:
      appendCode in class TypedOperation
      Parameters:
      inputVars - the list of input variables for this operation
      b - the StringBuilder
    • substitute

      public TypedTermOperation substitute(Substitution substitution)
      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 class TypedOperation
      Parameters:
      substitution - the substitution
      Returns:
      the operation resulting from applying the substitution to the types of this operation
    • applyCaptureConversion

      public TypedOperation 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 class TypedOperation
      Returns:
      the operation result from applying a capture conversion to wildcard types of this operation
    • toParsableString

      public String 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 class TypedOperation
      Returns:
      a string representation of this operation