net.vidageek.mirror.invoke.dsl
Interface InvocationHandler<T>

All Known Implementing Classes:
DefaultInvocationHandler

public interface InvocationHandler<T>


Method Summary
 ConstructorHandler<T> constructor()
          Use this method to invoke a constructor using only arguments.
<C> ConstructorHandler<C>
constructor(Constructor<C> con)
          Use this method to invoke a constructor using its instance.
 Object getterFor(Field field)
          This is a convenience method for invoking getters that follow JavaBean notation
 Object getterFor(String fieldName)
          This is a convenience method for invoking getters that follow JavaBean notation
 MethodHandler method(Method method)
          Use this method to invoke a method using its instance.
 MethodHandler method(String methodName)
          Use this method to invoke a method by its name.
 SetterMethodHandler setterFor(Field field)
          This is a convenience method for invoking setters that follow JavaBean notation
 SetterMethodHandler setterFor(String fieldName)
          This is a convenience method for invoking setters that follow JavaBean notation
 

Method Detail

method

MethodHandler method(String methodName)
Use this method to invoke a method by its name.

Parameters:
methodName - name of the method to be invoked.
Returns:
An object responsible for method invocation.
Throws:
IllegalArgumentException - if methodName is null.

constructor

ConstructorHandler<T> constructor()
Use this method to invoke a constructor using only arguments.

Returns:
An object responsible by constructor invocation.
Throws:
IllegalStateException - if class was not provided.

method

MethodHandler method(Method method)
Use this method to invoke a method using its instance.

Parameters:
method - Method to be invoked.
Returns:
An object responsible for method invocation.

constructor

<C> ConstructorHandler<C> constructor(Constructor<C> con)
Use this method to invoke a constructor using its instance.

Parameters:
con - Constructor to be invoked.
Returns:
An object responsible for constructor invocation.

getterFor

Object getterFor(String fieldName)
This is a convenience method for invoking getters that follow JavaBean notation

Parameters:
fieldName -
Returns:
Value of the field fieldName

getterFor

Object getterFor(Field field)
This is a convenience method for invoking getters that follow JavaBean notation

Parameters:
field - field associated with the getter
Returns:
Value of the field fieldName

setterFor

SetterMethodHandler setterFor(String fieldName)
This is a convenience method for invoking setters that follow JavaBean notation

Parameters:
fieldName -
Returns:
An object responsible for setting values

setterFor

SetterMethodHandler setterFor(Field field)
This is a convenience method for invoking setters that follow JavaBean notation

Parameters:
field -
Returns:
An object responsible for setting values


Copyright © 2011 VidaGeek.net. All Rights Reserved.