Module java4ever.binding
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 Summary
ConstructorsConstructorDescriptionJavaRecord(StructType originalType, String name, ParserEngine.SdkInterfaceParent superInterface, boolean isSimpleWrapper, boolean isParams, boolean isResult, Map<ParserEngine.SdkType, JavaType> typeLibrary) Creates an instance of aJavaRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanbooleanisParams()Returns the value of theisParamsrecord component.booleanisResult()Returns the value of theisResultrecord component.booleanReturns the value of theisSimpleWrapperrecord component.booleanname()Returns the value of thenamerecord component.static JavaRecordofApiType(StructType struct, Map<ParserEngine.SdkType, JavaType> typeLibrary, ParserEngine.SdkInterfaceParent superInterface) Returns the value of theoriginalTyperecord component.Returns the value of thesuperInterfacerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetypeLibraryrecord component.withSuperInterface(ParserEngine.SdkInterfaceParent superInterface)
-
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 aJavaRecordrecord class.- Parameters:
originalType- the value for theoriginalTyperecord componentname- the value for thenamerecord componentsuperInterface- the value for thesuperInterfacerecord componentisSimpleWrapper- the value for theisSimpleWrapperrecord componentisParams- the value for theisParamsrecord componentisResult- the value for theisResultrecord componenttypeLibrary- the value for thetypeLibraryrecord component
-
-
Method Details
-
ofApiType
public static JavaRecord ofApiType(StructType struct, Map<ParserEngine.SdkType, JavaType> typeLibrary, ParserEngine.SdkInterfaceParent superInterface) -
poeticize
-
type
-
isFlatType
public boolean isFlatType()- Specified by:
isFlatTypein interfaceJavaType
-
isStructure
public boolean isStructure()- Specified by:
isStructurein interfaceJavaType
-
withSuperInterface
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
originalType
Returns the value of theoriginalTyperecord component.- Returns:
- the value of the
originalTyperecord component
-
name
Returns the value of thenamerecord component. -
superInterface
Returns the value of thesuperInterfacerecord component.- Returns:
- the value of the
superInterfacerecord component
-
isSimpleWrapper
public boolean isSimpleWrapper()Returns the value of theisSimpleWrapperrecord component.- Specified by:
isSimpleWrapperin interfaceJavaType- Returns:
- the value of the
isSimpleWrapperrecord component
-
isParams
public boolean isParams()Returns the value of theisParamsrecord component. -
isResult
public boolean isResult()Returns the value of theisResultrecord component. -
typeLibrary
Returns the value of thetypeLibraryrecord component.- Returns:
- the value of the
typeLibraryrecord component
-