Record Class SdkRecord

java.lang.Object
java.lang.Record
tech.deplant.java4ever.binding.generator.jtype.SdkRecord
All Implemented Interfaces:
SdkObject

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

    • SdkRecord

      public SdkRecord(StructType originalType, String name, ParserEngine.SdkInterfaceParent superInterface, boolean isSimpleWrapper, boolean isParams, boolean isResult, Map<ParserEngine.SdkType,SdkObject> typeLibrary)
      Creates an instance of a SdkRecord 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 SdkRecord ofApiType(StructType struct, Map<ParserEngine.SdkType,SdkObject> typeLibrary, ParserEngine.SdkInterfaceParent superInterface)
    • poeticize

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

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

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

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

      public SdkRecord 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 SdkObject
      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 SdkObject
      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 SdkObject
      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 SdkObject
      Returns:
      the value of the isResult record component
    • typeLibrary

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