Record Class GenericFieldView

java.lang.Object
java.lang.Record
dev.archunitjava.model.GenericFieldView

public record GenericFieldView(JvmType erasedType, Optional<String> declaredSignature, Optional<GenericType> genericType, List<GenericSignatureDiagnostic> diagnostics) extends Record
Erased field type plus independently parsed optional generic evidence.
  • Constructor Details

    • GenericFieldView

      public GenericFieldView(JvmType erasedType, Optional<String> declaredSignature, Optional<GenericType> genericType, List<GenericSignatureDiagnostic> diagnostics)
      Creates an instance of a GenericFieldView record class.
      Parameters:
      erasedType - the value for the erasedType record component
      declaredSignature - the value for the declaredSignature record component
      genericType - the value for the genericType record component
      diagnostics - the value for the diagnostics record component
  • Method Details

    • usesErasedFallback

      public boolean usesErasedFallback()
    • referencedTypes

      public List<JvmReferenceType> referencedTypes(TypeReferenceEvidence evidence)
    • 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.
    • erasedType

      public JvmType erasedType()
      Returns the value of the erasedType record component.
      Returns:
      the value of the erasedType record component
    • declaredSignature

      public Optional<String> declaredSignature()
      Returns the value of the declaredSignature record component.
      Returns:
      the value of the declaredSignature record component
    • genericType

      public Optional<GenericType> genericType()
      Returns the value of the genericType record component.
      Returns:
      the value of the genericType record component
    • diagnostics

      public List<GenericSignatureDiagnostic> diagnostics()
      Returns the value of the diagnostics record component.
      Returns:
      the value of the diagnostics record component