public class BeanSerializerBuilder
extends java.lang.Object
JsonSerializer for serializing
intances.
Main reason for using separate builder class is that this makes it easier
to make actual serializer class fully immutable.| Constructor and Description |
|---|
BeanSerializerBuilder(BeanDescription beanDesc) |
| Modifier and Type | Method and Description |
|---|---|
JsonSerializer<?> |
build()
Method called to create
BeanSerializer instance with
all accumulated information. |
BeanSerializer |
createDummy()
Factory method for constructing an "empty" serializer; one that
outputs no properties (but handles JSON objects properly, including
type information)
|
AnyGetterWriter |
getAnyGetter() |
BeanDescription |
getBeanDescription() |
AnnotatedClass |
getClassInfo() |
BeanPropertyWriter[] |
getFilteredProperties() |
java.lang.Object |
getFilterId() |
ObjectIdWriter |
getObjectIdWriter() |
java.util.List<BeanPropertyWriter> |
getProperties() |
AnnotatedMember |
getTypeId() |
boolean |
hasProperties() |
void |
setAnyGetter(AnyGetterWriter anyGetter) |
void |
setFilteredProperties(BeanPropertyWriter[] properties) |
void |
setFilterId(java.lang.Object filterId) |
void |
setObjectIdWriter(ObjectIdWriter w) |
void |
setProperties(java.util.List<BeanPropertyWriter> properties) |
void |
setTypeId(AnnotatedMember idProp) |
public BeanSerializerBuilder(BeanDescription beanDesc)
public void setProperties(java.util.List<BeanPropertyWriter> properties)
public void setFilteredProperties(BeanPropertyWriter[] properties)
properties - Number and order of properties here MUST match that
of "regular" properties set earlier using setProperties(List); if not,
an IllegalArgumentException will be thrownpublic void setAnyGetter(AnyGetterWriter anyGetter)
public void setFilterId(java.lang.Object filterId)
public void setTypeId(AnnotatedMember idProp)
public void setObjectIdWriter(ObjectIdWriter w)
public AnnotatedClass getClassInfo()
public BeanDescription getBeanDescription()
public java.util.List<BeanPropertyWriter> getProperties()
public boolean hasProperties()
public BeanPropertyWriter[] getFilteredProperties()
public AnyGetterWriter getAnyGetter()
public java.lang.Object getFilterId()
public AnnotatedMember getTypeId()
public ObjectIdWriter getObjectIdWriter()
public JsonSerializer<?> build()
BeanSerializer instance with
all accumulated information. Will construct a serializer if we
have enough information, or return null if not.public BeanSerializer createDummy()
Copyright © 2010 - 2023 Adobe. All Rights Reserved