Record Class AnnotationMetadata

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

public record AnnotationMetadata(@NonNull Class<? extends Annotation> annotationType, @NonNull Map<String,Object> annotationValueMap, @Nullable Class<?> fieldTypeOverride) extends Record
  • Constructor Details

    • AnnotationMetadata

      public AnnotationMetadata(@NonNull Class<? extends Annotation> annotationType, @NonNull Map<String,Object> annotationValueMap, @Nullable Class<?> fieldTypeOverride)
      Creates an instance of a AnnotationMetadata record class.
      Parameters:
      annotationType - the value for the annotationType record component
      annotationValueMap - the value for the annotationValueMap record component
      fieldTypeOverride - the value for the fieldTypeOverride record component
  • Method Details

    • addAnnotationTo

      public void addAnnotationTo(org.objectweb.asm.ClassVisitor classVisitor)
    • addAnnotationTo

      public void addAnnotationTo(org.objectweb.asm.FieldVisitor fieldVisitor)
    • addAnnotationTo

      public void addAnnotationTo(org.objectweb.asm.MethodVisitor methodVisitor)
    • getAnnotationListWithoutRepeatable

      public static List<AnnotationMetadata> getAnnotationListWithoutRepeatable(List<AnnotationMetadata> metadata)
    • getValueAsType

      public static org.objectweb.asm.Type getValueAsType(String className)
    • 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. 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.
    • annotationType

      public @NonNull Class<? extends Annotation> annotationType()
      Returns the value of the annotationType record component.
      Returns:
      the value of the annotationType record component
    • annotationValueMap

      public @NonNull Map<String,Object> annotationValueMap()
      Returns the value of the annotationValueMap record component.
      Returns:
      the value of the annotationValueMap record component
    • fieldTypeOverride

      public @Nullable Class<?> fieldTypeOverride()
      Returns the value of the fieldTypeOverride record component.
      Returns:
      the value of the fieldTypeOverride record component