Record Class JavaRecord

java.lang.Object
java.lang.Record
tech.deplant.java4ever.binding.generator.jtype.JavaRecord
All Implemented Interfaces:
JavaType

public record JavaRecord(StructType originalType, String name, ParserEngine.SdkInterfaceParent superInterface, boolean isSimpleWrapper, boolean isParams, boolean isResult, Map<ParserEngine.SdkType,JavaType> typeLibrary) extends Record implements JavaType
  • Constructor Details

    • JavaRecord

      public JavaRecord(StructType originalType, String name, ParserEngine.SdkInterfaceParent superInterface, boolean isSimpleWrapper, boolean isParams, boolean isResult, Map<ParserEngine.SdkType,JavaType> typeLibrary)
      Creates an instance of a JavaRecord record class.
      Parameters:
      originalType - the value for the originalType record component
      name - the value for the name record component
      superInterface - the value for the superInterface record component
      isSimpleWrapper - the value for the isSimpleWrapper record component
      isParams - the value for the isParams record component
      isResult - the value for the isResult record component
      typeLibrary - the value for the typeLibrary record component
  • Method Details

    • ofApiType

      public static JavaRecord ofApiType(StructType struct, Map<ParserEngine.SdkType,JavaType> typeLibrary, ParserEngine.SdkInterfaceParent superInterface)
    • poeticize

      public TypeSpec.Builder poeticize()
      Specified by:
      poeticize in interface JavaType
    • type

      public ApiType type()
      Specified by:
      type in interface JavaType
    • isFlatType

      public boolean isFlatType()
      Specified by:
      isFlatType in interface JavaType
    • isStructure

      public boolean isStructure()
      Specified by:
      isStructure in interface JavaType
    • withSuperInterface

      public JavaRecord withSuperInterface(ParserEngine.SdkInterfaceParent superInterface)
    • 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.
    • originalType

      public StructType originalType()
      Returns the value of the originalType record component.
      Returns:
      the value of the originalType record component
    • name

      public String name()
      Returns the value of the name record component.
      Specified by:
      name in interface JavaType
      Returns:
      the value of the name record component
    • superInterface

      public ParserEngine.SdkInterfaceParent superInterface()
      Returns the value of the superInterface record component.
      Returns:
      the value of the superInterface record component
    • isSimpleWrapper

      public boolean isSimpleWrapper()
      Returns the value of the isSimpleWrapper record component.
      Specified by:
      isSimpleWrapper in interface JavaType
      Returns:
      the value of the isSimpleWrapper record component
    • isParams

      public boolean isParams()
      Returns the value of the isParams record component.
      Specified by:
      isParams in interface JavaType
      Returns:
      the value of the isParams record component
    • isResult

      public boolean isResult()
      Returns the value of the isResult record component.
      Specified by:
      isResult in interface JavaType
      Returns:
      the value of the isResult record component
    • typeLibrary

      public Map<ParserEngine.SdkType,JavaType> typeLibrary()
      Returns the value of the typeLibrary record component.
      Returns:
      the value of the typeLibrary record component