Record Class InferenceSolution.Success

java.lang.Object
java.lang.Record
net.covers1624.coffeegrinder.bytecode.transform.transformers.generics.InferenceSolution.Success
All Implemented Interfaces:
InferenceSolution, TypeSubstitutions.TypeMapper, TypeSubstitutions.TypeParamMapper
Enclosing interface:
InferenceSolution

public static record InferenceSolution.Success(Map<TypeParameter,ReferenceType> map, AType retType, List<LambdaType> lambdaTypes, Map<AbstractInvoke,InferenceSolution.Success> nested, boolean hasRawArgs, boolean explicit, List<InferenceSolution.RequiredCast> requiredCasts) extends Record implements InferenceSolution, TypeSubstitutions.TypeParamMapper
  • Constructor Details

    • Success

      public Success(Map<TypeParameter,ReferenceType> map, AType retType, List<LambdaType> lambdaTypes, Map<AbstractInvoke,InferenceSolution.Success> nested, boolean hasRawArgs, boolean explicit, List<InferenceSolution.RequiredCast> requiredCasts)
      Creates an instance of a Success record class.
      Parameters:
      map - the value for the map record component
      retType - the value for the retType record component
      lambdaTypes - the value for the lambdaTypes record component
      nested - the value for the nested record component
      hasRawArgs - the value for the hasRawArgs record component
      explicit - the value for the explicit record component
      requiredCasts - the value for the requiredCasts record component
  • Method Details

    • mapParam

      public ReferenceType mapParam(TypeParameter param)
      Description copied from interface: TypeSubstitutions.TypeParamMapper
      Map the given TypeParameter to a ReferenceType.

      May produce an identity mapping.

      Specified by:
      mapParam in interface TypeSubstitutions.TypeParamMapper
      Parameters:
      param - The parameter to map.
      Returns:
      The result.
    • makeExplicit

      public InferenceSolution.Success makeExplicit()
    • typesEqual

      public boolean typesEqual(InferenceSolution.Success s)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • map

      Returns the value of the map record component.
      Returns:
      the value of the map record component
    • retType

      public AType retType()
      Returns the value of the retType record component.
      Returns:
      the value of the retType record component
    • lambdaTypes

      public List<LambdaType> lambdaTypes()
      Returns the value of the lambdaTypes record component.
      Returns:
      the value of the lambdaTypes record component
    • nested

      Returns the value of the nested record component.
      Returns:
      the value of the nested record component
    • hasRawArgs

      public boolean hasRawArgs()
      Returns the value of the hasRawArgs record component.
      Returns:
      the value of the hasRawArgs record component
    • explicit

      public boolean explicit()
      Returns the value of the explicit record component.
      Returns:
      the value of the explicit record component
    • requiredCasts

      public List<InferenceSolution.RequiredCast> requiredCasts()
      Returns the value of the requiredCasts record component.
      Returns:
      the value of the requiredCasts record component