Record Class ClassCode

java.lang.Object
java.lang.Record
io.helidon.codegen.ClassCode
Record Components:
newType - the type that is to be created
classModel - class code
mainTrigger - main type responsible for this code generation
originatingElements - to map to source types that triggered this code generation

public record ClassCode(TypeName newType, ClassModel.Builder classModel, TypeName mainTrigger, Object[] originatingElements) extends Record
A code generated type.
  • Constructor Details

    • ClassCode

      public ClassCode(TypeName newType, ClassModel.Builder classModel, TypeName mainTrigger, Object... originatingElements)
      Creates an instance of a ClassCode record class.
      Parameters:
      newType - the value for the newType record component
      classModel - the value for the classModel record component
      mainTrigger - the value for the mainTrigger record component
      originatingElements - the value for the originatingElements record component
  • Method Details

    • 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.
    • newType

      public TypeName newType()
      Returns the value of the newType record component.
      Returns:
      the value of the newType record component
    • classModel

      public ClassModel.Builder classModel()
      Returns the value of the classModel record component.
      Returns:
      the value of the classModel record component
    • mainTrigger

      public TypeName mainTrigger()
      Returns the value of the mainTrigger record component.
      Returns:
      the value of the mainTrigger record component
    • originatingElements

      public Object[] originatingElements()
      Returns the value of the originatingElements record component.
      Returns:
      the value of the originatingElements record component