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
ConstructorDescriptionValueContextImpl
(PrettyPrinter prettyPrinter, Class type, Object value, ValueContext parent, com.fasterxml.jackson.databind.introspect.BasicBeanDescription beanDescription) Creates an instance of aValueContextImpl
record class.ValueContextImpl
(PrettyPrinter prettyPrinter, Object dto) -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.introspect.BasicBeanDescription
Returns the value of thebeanDescription
record component.final boolean
Indicates whether some other object is "equal to" this one.int
getLevel()
getPropertyContext
(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition property) final int
hashCode()
Returns a hash code value for this object.parent()
Returns the value of theparent
record component.Returns the value of theprettyPrinter
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.value()
Returns the value of thevalue
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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 aValueContextImpl
record class.- Parameters:
prettyPrinter
- the value for theprettyPrinter
record componenttype
- the value for thetype
record componentvalue
- the value for thevalue
record componentparent
- the value for theparent
record componentbeanDescription
- the value for thebeanDescription
record component
-
-
Method Details
-
getLocale
- Specified by:
getLocale
in interfaceValueContext
-
getPrettyPrinter
- Specified by:
getPrettyPrinter
in interfaceValueContext
-
getPropertyContext
public PropertyContext getPropertyContext(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition property) - Specified by:
getPropertyContext
in interfaceValueContext
-
getLevel
public int getLevel()- Specified by:
getLevel
in interfaceValueContext
- Returns:
- the level of the property in the object graph
-
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)
. -
prettyPrinter
Returns the value of theprettyPrinter
record component.- Returns:
- the value of the
prettyPrinter
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
value
Returns the value of thevalue
record component.- Specified by:
value
in interfaceValueContext
- Returns:
- the value of the
value
record component
-
parent
Returns the value of theparent
record component.- Specified by:
parent
in interfaceValueContext
- Returns:
- the value of the
parent
record component
-
beanDescription
public com.fasterxml.jackson.databind.introspect.BasicBeanDescription beanDescription()Returns the value of thebeanDescription
record component.- Specified by:
beanDescription
in interfaceValueContext
- Returns:
- the value of the
beanDescription
record component
-