Package org.vaadin.firitin.rad
Record Class ValueContextImpl
java.lang.Object
java.lang.Record
org.vaadin.firitin.rad.ValueContextImpl
- All Implemented Interfaces:
ValueContext
public record ValueContextImpl(PrettyPrinter prettyPrinter, Class type, Object value, ValueContext parent, com.fasterxml.jackson.databind.introspect.BasicBeanDescription beanDescription)
extends Record
implements ValueContext
ValueContext is a helper class to pass around the context of the value being displayed/printed.
Experimental, not yet stable API.
-
Constructor Summary
ConstructorsConstructorDescriptionValueContextImpl(PrettyPrinter prettyPrinter, Class type, Object value, ValueContext parent, com.fasterxml.jackson.databind.introspect.BasicBeanDescription beanDescription) Creates an instance of aValueContextImplrecord class.ValueContextImpl(PrettyPrinter prettyPrinter, Object dto) -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.introspect.BasicBeanDescriptionReturns the value of thebeanDescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.intgetLevel()getPropertyContext(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition property) final inthashCode()Returns a hash code value for this object.parent()Returns the value of theparentrecord component.Returns the value of theprettyPrinterrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.value()Returns the value of thevaluerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.vaadin.firitin.rad.ValueContext
toShortString
-
Constructor Details
-
ValueContextImpl
-
ValueContextImpl
public ValueContextImpl(PrettyPrinter prettyPrinter, Class type, Object value, ValueContext parent, com.fasterxml.jackson.databind.introspect.BasicBeanDescription beanDescription) Creates an instance of aValueContextImplrecord class.- Parameters:
prettyPrinter- the value for theprettyPrinterrecord componenttype- the value for thetyperecord componentvalue- the value for thevaluerecord componentparent- the value for theparentrecord componentbeanDescription- the value for thebeanDescriptionrecord component
-
-
Method Details
-
getLocale
- Specified by:
getLocalein interfaceValueContext
-
getPrettyPrinter
- Specified by:
getPrettyPrinterin interfaceValueContext
-
getPropertyContext
public PropertyContext getPropertyContext(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition property) - Specified by:
getPropertyContextin interfaceValueContext
-
getLevel
public int getLevel()- Specified by:
getLevelin interfaceValueContext- Returns:
- the level of the property in the object graph
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
prettyPrinter
Returns the value of theprettyPrinterrecord component.- Returns:
- the value of the
prettyPrinterrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
value
Returns the value of thevaluerecord component.- Specified by:
valuein interfaceValueContext- Returns:
- the value of the
valuerecord component
-
parent
Returns the value of theparentrecord component.- Specified by:
parentin interfaceValueContext- Returns:
- the value of the
parentrecord component
-
beanDescription
public com.fasterxml.jackson.databind.introspect.BasicBeanDescription beanDescription()Returns the value of thebeanDescriptionrecord component.- Specified by:
beanDescriptionin interfaceValueContext- Returns:
- the value of the
beanDescriptionrecord component
-