Record Class GsonRootObjectVisitor
java.lang.Object
java.lang.Record
eu.cloudnetservice.driver.impl.document.gson.send.GsonRootObjectVisitor
- Record Components:
rootObject- the root json object to put all child elements into.
- All Implemented Interfaces:
eu.cloudnetservice.driver.document.send.ElementVisitor
public record GsonRootObjectVisitor(@NonNull com.google.gson.JsonObject rootObject)
extends Record
implements eu.cloudnetservice.driver.document.send.ElementVisitor
An element visitor to visit the root object element of a document send. This visitor only accepts calls to
visitObject(ObjectElement), all other calls with throw an UnsupportedOperationException.- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull com.google.gson.JsonObjectThe field for therootObjectrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGsonRootObjectVisitor(@NonNull com.google.gson.JsonObject rootObject) Creates an instance of aGsonRootObjectVisitorrecord 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.@NonNull com.google.gson.JsonObjectReturns the value of therootObjectrecord component.final StringtoString()Returns a string representation of this record class.@NonNull eu.cloudnetservice.driver.document.send.ElementVisitorvisitArray(@NonNull eu.cloudnetservice.driver.document.send.element.ArrayElement entry) voidvisitEnd()void@NonNull eu.cloudnetservice.driver.document.send.ElementVisitorvisitObject(@NonNull eu.cloudnetservice.driver.document.send.element.ObjectElement entry) voidvisitPrimitive(@NonNull eu.cloudnetservice.driver.document.send.element.PrimitiveElement entry)
-
Field Details
-
rootObject
The field for therootObjectrecord component.
-
-
Constructor Details
-
GsonRootObjectVisitor
Creates an instance of aGsonRootObjectVisitorrecord class.- Parameters:
rootObject- the value for therootObjectrecord component
-
-
Method Details
-
visitEnd
public void visitEnd()- Specified by:
visitEndin interfaceeu.cloudnetservice.driver.document.send.ElementVisitor
-
visitNull
-
visitPrimitive
-
visitArray
-
visitObject
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
rootObject
Returns the value of therootObjectrecord component.- Returns:
- the value of the
rootObjectrecord component
-