net.sf.morph.reflect.support
Class MethodHolder

java.lang.Object
  extended by net.sf.morph.reflect.support.MethodHolder

public class MethodHolder
extends java.lang.Object

Holds a reference to the getter and setter methods of a JavaBeans property.

Since:
Feb 3, 2005
Author:
Matt Sgarlata, Alexander Volanis

Constructor Summary
MethodHolder()
           
 
Method Summary
 java.lang.reflect.Method getAccessor()
           
 java.lang.reflect.Method getIndexedAccessor()
           
 java.lang.reflect.Method getIndexedMutator()
           
 java.lang.reflect.Method getMutator()
           
 java.lang.Object invokeAccessor(java.lang.Object bean)
           
 java.lang.Object invokeIndexedAccessor(java.lang.Object bean, java.lang.Object index)
           
 void invokeIndexedMutator(java.lang.Object bean, java.lang.Object index, java.lang.Object value)
           
 void invokeMutator(java.lang.Object bean, java.lang.Object value)
           
protected  java.lang.String methodToString(java.lang.reflect.Method method)
           
 void setAccessor(java.lang.reflect.Method accessor)
           
 void setIndexedAccessor(java.lang.reflect.Method indexedAccessor)
           
 void setIndexedMutator(java.lang.reflect.Method indexedMutator)
           
 void setMutator(java.lang.reflect.Method mutator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodHolder

public MethodHolder()
Method Detail

getAccessor

public java.lang.reflect.Method getAccessor()

setAccessor

public void setAccessor(java.lang.reflect.Method accessor)

getMutator

public java.lang.reflect.Method getMutator()

setMutator

public void setMutator(java.lang.reflect.Method mutator)

getIndexedAccessor

public java.lang.reflect.Method getIndexedAccessor()

setIndexedAccessor

public void setIndexedAccessor(java.lang.reflect.Method indexedAccessor)

getIndexedMutator

public java.lang.reflect.Method getIndexedMutator()

setIndexedMutator

public void setIndexedMutator(java.lang.reflect.Method indexedMutator)

methodToString

protected java.lang.String methodToString(java.lang.reflect.Method method)

invokeMutator

public void invokeMutator(java.lang.Object bean,
                          java.lang.Object value)
                   throws java.lang.IllegalArgumentException,
                          java.lang.IllegalAccessException,
                          java.lang.reflect.InvocationTargetException
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

invokeAccessor

public java.lang.Object invokeAccessor(java.lang.Object bean)
                                throws java.lang.IllegalArgumentException,
                                       java.lang.IllegalAccessException,
                                       java.lang.reflect.InvocationTargetException
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

invokeIndexedMutator

public void invokeIndexedMutator(java.lang.Object bean,
                                 java.lang.Object index,
                                 java.lang.Object value)
                          throws java.lang.IllegalArgumentException,
                                 java.lang.IllegalAccessException,
                                 java.lang.reflect.InvocationTargetException
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

invokeIndexedAccessor

public java.lang.Object invokeIndexedAccessor(java.lang.Object bean,
                                              java.lang.Object index)
                                       throws java.lang.IllegalArgumentException,
                                              java.lang.IllegalAccessException,
                                              java.lang.reflect.InvocationTargetException
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException


Copyright © 2004-2008.