Class PropertyValuePropagation
- java.lang.Object
-
- org.eclipse.yasson.internal.model.PropertyValuePropagation
-
- Direct Known Subclasses:
ReflectionPropagation
public abstract class PropertyValuePropagation extends java.lang.ObjectAbstract class for getting / setting value into the property.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPropertyValuePropagation.OperationModeMode of property propagation get or set.
-
Constructor Summary
Constructors Modifier Constructor Description protectedPropertyValuePropagation(Property property, javax.json.bind.config.PropertyVisibilityStrategy strategy)Construct a property propagation.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidacceptField(java.lang.reflect.Field field, PropertyValuePropagation.OperationMode mode)Accept aFieldto use for value propagation.protected abstract voidacceptMethod(java.lang.reflect.Method method, PropertyValuePropagation.OperationMode mode)Accept aMethodto use value propagation.java.lang.reflect.FieldgetField()Field of a javabean property.java.lang.reflect.MethodgetGetter()Setter of a javabean property.java.lang.reflect.MethodgetSetter()Getter of a javabean property.booleanisGetterVisible()booleanisReadable()Property is readable.booleanisSetterVisible()booleanisWritable()Property is writable.
-
-
-
Constructor Detail
-
PropertyValuePropagation
protected PropertyValuePropagation(Property property, javax.json.bind.config.PropertyVisibilityStrategy strategy)
Construct a property propagation.- Parameters:
property- Provided property.strategy- Visibility strategy
-
-
Method Detail
-
acceptMethod
protected abstract void acceptMethod(java.lang.reflect.Method method, PropertyValuePropagation.OperationMode mode)Accept aMethodto use value propagation.- Parameters:
method- methodmode- read or write
-
acceptField
protected abstract void acceptField(java.lang.reflect.Field field, PropertyValuePropagation.OperationMode mode)Accept aFieldto use for value propagation.- Parameters:
field- fieldmode- mod
-
isWritable
public boolean isWritable()
Property is writable. Based on access policy and java field modifiers.- Returns:
- true if can be deserialized from JSON
-
isReadable
public boolean isReadable()
Property is readable. Based on access policy and java field modifiers.- Returns:
- true if can be serialized to JSON
-
getField
public java.lang.reflect.Field getField()
Field of a javabean property.- Returns:
field
-
getGetter
public java.lang.reflect.Method getGetter()
Setter of a javabean property.- Returns:
getter
-
getSetter
public java.lang.reflect.Method getSetter()
Getter of a javabean property.- Returns:
setter
-
isGetterVisible
public boolean isGetterVisible()
-
isSetterVisible
public boolean isSetterVisible()
-
-