Record Class TypeHint

java.lang.Object
java.lang.Record
ai.timefold.jpyinterpreter.TypeHint

public record TypeHint(PythonLikeType type, List<AnnotationMetadata> annotationList, TypeHint[] genericArgs, PythonLikeType javaGetterType) extends Record
  • Constructor Details

  • Method Details

    • getOverrideTypeDescriptor

      public @Nullable String getOverrideTypeDescriptor()
    • addAnnotations

      public TypeHint addAnnotations(List<AnnotationMetadata> addedAnnotations)
    • withoutAnnotations

      public static TypeHint withoutAnnotations(PythonLikeType type)
    • equals

      public 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • hashCode

      public 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
    • toString

      public 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
    • type

      public PythonLikeType type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • annotationList

      public List<AnnotationMetadata> annotationList()
      Returns the value of the annotationList record component.
      Returns:
      the value of the annotationList record component
    • genericArgs

      public TypeHint[] genericArgs()
      Returns the value of the genericArgs record component.
      Returns:
      the value of the genericArgs record component
    • javaGetterType

      public PythonLikeType javaGetterType()
      Returns the value of the javaGetterType record component.
      Returns:
      the value of the javaGetterType record component