|
jTransfo, 0.10 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jtransfo.internal.AccessorSyntheticField
public class AccessorSyntheticField
Abstraction of a Field which uses the getter and setter if they exist.
| Constructor Summary | |
|---|---|
AccessorSyntheticField(ReflectionHelper reflectionHelper,
Class<?> clazz,
Field field)
Constructor, access field using getter and setter if exist. |
|
AccessorSyntheticField(ReflectionHelper reflectionHelper,
Class<?> clazz,
String name,
boolean readOnlyField)
Constructor, there is no field, just use getter (and setter is not readOnly). |
|
| Method Summary | |
|---|---|
Object |
get(Object object)
Get field value. |
String |
getName()
Get field name. |
Class<?> |
getType()
Get field type. |
void |
set(Object object,
Object value)
Set field value. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AccessorSyntheticField(ReflectionHelper reflectionHelper,
Class<?> clazz,
Field field)
reflectionHelper - reflection helper to useclazz - clazz of which the field is partfield - field (may be in a parent class of clazz)
public AccessorSyntheticField(ReflectionHelper reflectionHelper,
Class<?> clazz,
String name,
boolean readOnlyField)
throws JTransfoException
reflectionHelper - reflection helper to useclazz - clazz of which the field is partname - field namereadOnlyField - is a getter sufficient
JTransfoException - can not find getter for given name or| Method Detail |
|---|
public Object get(Object object)
throws IllegalAccessException,
IllegalArgumentException
get in interface SyntheticFieldobject - object which contains the field.
IllegalAccessException - illegal access
IllegalArgumentException - illegal argument
public void set(Object object,
Object value)
throws IllegalAccessException,
IllegalArgumentException
set in interface SyntheticFieldobject - object which contains the field.value - field value
IllegalAccessException - illegal access
IllegalArgumentException - illegal argumentpublic String getName()
getName in interface SyntheticFieldpublic Class<?> getType()
getType in interface SyntheticField
|
jTransfo, 0.10 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||