ewe.reflect
Class FieldTransfer

java.lang.Object
  extended byewe.reflect.FieldTransfer

public class FieldTransfer
extends Object


Field Summary
 DataConverter converter
          An optional DataConverter.
 Object dataInterface
          This is the Control used for the field in an Editor.
 Object dataObject
          The data object being used.
 Field field
          The field in the Object (if one exists).
 Object fieldEvent
          The field event that occured.
 String fieldName
          The full name of the field.
 String fieldType
          The type of the field.
static int FROM_OBJECT
           
 String fullFieldName
          The full field name.
protected  Wrapper fWrapper
           
 Method getMethod
          The get() method used on the data interface - this is not used on the data object.
 Method getSetFieldMethod
          The combined getSetField() method used on the data object.
 Method getSetMethod
          The combined getSet() method used on the data interface.
protected  Wrapper gsWrapper
           
 String ifType
          The type of the data used by the interface object.
protected  Wrapper ifWrapper
           
protected  Wrapper objWrapper
           
protected  Wrapper[] oneParameter
           
 String pureName
          The pure name of the field without any extra specifiers.
protected  Wrapper retWrapper
           
 Method setMethod
          The set() method used on the data interface - this is not used on the data object.
protected  Wrapper[] threeParameters
           
static int TO_OBJECT
           
 String transferType
          The type of the data being transfered.
 
Constructor Summary
FieldTransfer(Object objectOrReflect, String fieldName)
           
FieldTransfer(Object objectOrReflect, String fieldName, Control dataInterface)
           
FieldTransfer(Reflect objectClass, Object sampleOrDataObject, String fieldName, Object dataInterface, DataConverter converter)
           
FieldTransfer(String fieldName)
          This is only used to create a dummy field transfer.
 
Method Summary
 Object getFieldValue(Object obj)
           
 Wrapper getFieldValue(Object obj, Wrapper dest)
           
 FieldTransfer getFor(Object data, Control control)
           
 boolean isField(String field)
           
 boolean isValid()
          Returns true if this FieldTransfer can actually do a transfer.
 boolean setMethodsFor(String classSpec, String getMethodName, String getMethodSignature, String setMethodName, String setMethodSignature)
           
 String toString()
          Return a String representation of this object.
 void transfer(int direction)
          This uses the "dataObject" variable as the object for field transfer.
 void transfer(Object obj, int direction)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode
 

Field Detail

dataInterface

public Object dataInterface
This is the Control used for the field in an Editor.


setMethod

public Method setMethod
The set() method used on the data interface - this is not used on the data object.


getMethod

public Method getMethod
The get() method used on the data interface - this is not used on the data object.


getSetMethod

public Method getSetMethod
The combined getSet() method used on the data interface.


getSetFieldMethod

public Method getSetFieldMethod
The combined getSetField() method used on the data object.


field

public Field field
The field in the Object (if one exists).


fieldName

public String fieldName
The full name of the field.


fieldType

public String fieldType
The type of the field.


transferType

public String transferType
The type of the data being transfered.


ifType

public String ifType
The type of the data used by the interface object.


pureName

public String pureName
The pure name of the field without any extra specifiers.


fullFieldName

public String fullFieldName
The full field name.


objWrapper

protected Wrapper objWrapper

ifWrapper

protected Wrapper ifWrapper

fWrapper

protected Wrapper fWrapper

retWrapper

protected Wrapper retWrapper

gsWrapper

protected Wrapper gsWrapper

oneParameter

protected Wrapper[] oneParameter

threeParameters

protected Wrapper[] threeParameters

converter

public DataConverter converter
An optional DataConverter.


fieldEvent

public Object fieldEvent
The field event that occured.


dataObject

public Object dataObject
The data object being used.


TO_OBJECT

public static final int TO_OBJECT
See Also:
Constant Field Values

FROM_OBJECT

public static final int FROM_OBJECT
See Also:
Constant Field Values
Constructor Detail

FieldTransfer

public FieldTransfer(String fieldName)
This is only used to create a dummy field transfer.


FieldTransfer

public FieldTransfer(Object objectOrReflect,
                     String fieldName)

FieldTransfer

public FieldTransfer(Object objectOrReflect,
                     String fieldName,
                     Control dataInterface)

FieldTransfer

public FieldTransfer(Reflect objectClass,
                     Object sampleOrDataObject,
                     String fieldName,
                     Object dataInterface,
                     DataConverter converter)
Method Detail

setMethodsFor

public boolean setMethodsFor(String classSpec,
                             String getMethodName,
                             String getMethodSignature,
                             String setMethodName,
                             String setMethodSignature)

getFor

public FieldTransfer getFor(Object data,
                            Control control)

isValid

public boolean isValid()
Returns true if this FieldTransfer can actually do a transfer.


isField

public boolean isField(String field)

getFieldValue

public Wrapper getFieldValue(Object obj,
                             Wrapper dest)

getFieldValue

public Object getFieldValue(Object obj)

transfer

public void transfer(int direction)
This uses the "dataObject" variable as the object for field transfer.


transfer

public void transfer(Object obj,
                     int direction)

toString

public String toString()
Description copied from class: Object
Return a String representation of this object.

Overrides:
toString in class Object
Returns:
a String representing this object.