Package jodd.json
Class TypeJsonVisitor
- java.lang.Object
-
- jodd.json.TypeJsonVisitor
-
- Direct Known Subclasses:
BeanSerializer
public abstract class TypeJsonVisitor extends java.lang.Object
Type's property visitor that follows JSON include/excludes rules.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
classMetadataName
protected int
count
protected boolean
declared
protected JsonContext
jsonContext
protected java.lang.Class
type
protected TypeData
typeData
-
Constructor Summary
Constructors Constructor Description TypeJsonVisitor(JsonContext jsonContext, java.lang.Class type)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
onProperty(java.lang.String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor, boolean isTransient)
Invoked on each property.protected abstract void
onSerializableProperty(java.lang.String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor)
Invoked on serializable properties, that have passed all the rules.void
visit()
Visits a type.
-
-
-
Field Detail
-
jsonContext
protected final JsonContext jsonContext
-
declared
protected final boolean declared
-
classMetadataName
protected final java.lang.String classMetadataName
-
type
protected final java.lang.Class type
-
count
protected int count
-
typeData
protected final TypeData typeData
-
-
Constructor Detail
-
TypeJsonVisitor
public TypeJsonVisitor(JsonContext jsonContext, java.lang.Class type)
-
-
Method Detail
-
visit
public void visit()
Visits a type.
-
onProperty
protected void onProperty(java.lang.String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor, boolean isTransient)
Invoked on each property. Properties are getting matched against the rules. If property passes all the rules, it will be processed inonSerializableProperty(String, jodd.introspector.PropertyDescriptor)
.
-
onSerializableProperty
protected abstract void onSerializableProperty(java.lang.String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor)
Invoked on serializable properties, that have passed all the rules. Property descriptor may benull
in special case when class meta data name is used.
-
-