public static class SerializationUtil.Attribute extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Field |
field |
protected Type |
genericType |
protected Method |
getter |
protected String |
name |
protected boolean |
noSerialization |
protected String |
originalName |
protected Method |
setter |
protected Class<?> |
type |
| Modifier | Constructor and Description |
|---|---|
protected |
Attribute(SerializationUtil.Attribute a)
Constructor.
|
|
Attribute(String name,
Field field,
Method getter,
Method setter,
Class<?> type,
Type genericType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canGet()
Return true if a getter exists or the field is public.
|
boolean |
canSet()
Return true if a setter exists or the field is public.
|
Class<?> |
getDeclaringClass()
Return the declaring class of the field or the getter or the setter.
|
Type |
getGenericType() |
String |
getName() |
String |
getOriginalName() |
Class<?> |
getType() |
Object |
getValue(Object instance)
Return the value of this attribute for the given instance.
|
void |
ignoreSerialization() |
Object |
instantiate(Object containerInstance)
Instantiate a new object of the type of this attribute.
|
void |
rename(String newName) |
void |
setValue(Object instance,
Object value)
Set the value of this attribute for the given instance.
|
protected String name
protected String originalName
protected Field field
protected Method getter
protected Method setter
protected Class<?> type
protected Type genericType
protected boolean noSerialization
public Attribute(String name, Field field, Method getter, Method setter, Class<?> type, Type genericType)
protected Attribute(SerializationUtil.Attribute a)
public String getOriginalName()
public String getName()
public void rename(String newName)
public Class<?> getType()
public Type getGenericType()
public void ignoreSerialization()
public boolean canGet()
public boolean canSet()
public Class<?> getDeclaringClass()
public Object getValue(Object instance) throws Exception
Exceptionpublic void setValue(Object instance, Object value) throws Exception
ExceptionCopyright © 2017. All rights reserved.