org.compass.core.util
Class FieldInvoker

java.lang.Object
  extended by org.compass.core.util.FieldInvoker

public class FieldInvoker
extends Object

Author:
kimchy

Constructor Summary
FieldInvoker(Class targetClass, String tagetField)
           
 
Method Summary
 Object get()
           
 Object get(Object targetObject)
           
 Class getTargetClass()
          Return the target class on which to call the target method.
 String getTargetField()
          Return the name of the field to be invoked.
 Object getTargetObject()
          Return the target object on which to call the target method.
 Object getTargetValue()
           
 FieldInvoker prepare()
           
 void set()
           
 void set(Object targetObject, Object targetValue)
           
 void setTargetClass(Class targetClass)
          Set the target class on which to call the target method.
 void setTargetField(String targetField)
          Set the name of the field to be invoked.
 void setTargetObject(Object targetObject)
          Set the target object on which to call the target method.
 void setTargetValue(Object targetValue)
          Sets the value that will be set to the field
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldInvoker

public FieldInvoker(Class targetClass,
                    String tagetField)
Method Detail

prepare

public FieldInvoker prepare()
                     throws NoSuchFieldException
Throws:
NoSuchFieldException

setTargetClass

public void setTargetClass(Class targetClass)
Set the target class on which to call the target method. Only necessary when the target method is static; else, a target object needs to be specified anyway.

See Also:
setTargetObject(java.lang.Object)

getTargetClass

public Class getTargetClass()
Return the target class on which to call the target method.


setTargetObject

public void setTargetObject(Object targetObject)
Set the target object on which to call the target method. Only necessary when the target method is not static; else, a target class is sufficient.

See Also:
setTargetClass(java.lang.Class)

getTargetObject

public Object getTargetObject()
Return the target object on which to call the target method.


setTargetField

public void setTargetField(String targetField)
Set the name of the field to be invoked.

See Also:
setTargetClass(java.lang.Class), setTargetObject(java.lang.Object)

getTargetField

public String getTargetField()
Return the name of the field to be invoked.


getTargetValue

public Object getTargetValue()

setTargetValue

public void setTargetValue(Object targetValue)
Sets the value that will be set to the field


get

public Object get()
           throws IllegalAccessException
Throws:
IllegalAccessException

get

public Object get(Object targetObject)
           throws IllegalAccessException
Throws:
IllegalAccessException

set

public void set()
         throws IllegalAccessException
Throws:
IllegalAccessException

set

public void set(Object targetObject,
                Object targetValue)
         throws IllegalAccessException
Throws:
IllegalAccessException


Copyright (c) 2004-2008 The Compass Project.