⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.functors

Class InvokerTransformer

java.lang.Object
|
+--org.apache.commons.collections.functors.InvokerTransformer

All Implemented Interfaces:
Transformer, Serializable


public class InvokerTransformer
extends java.lang.Object
implements Transformer, Serializable

Transformer implementation that creates a new object instance by reflection.
Since:
Commons Collections 3.0
Author:
Stephen Colebourne

Constructor Summary

InvokerTransformer(String methodName, Class[] paramTypes, Object[] args)

Constructor that performs no validation.

Method Summary

static Transformer

getInstance(String methodName, Class[] paramTypes, Object[] args)

Transformer method that performs validation.

Object

transform(Object input)

Return the result of instantiating the input Class object.

Constructor Details

InvokerTransformer

public InvokerTransformer(String methodName, Class[] paramTypes, Object[] args)

Constructor that performs no validation. Use getInstance if you want that.

Parameters:
methodName - the method to call
paramTypes - the constructor parameter types, not cloned
args - the constructor arguments, not cloned

Method Details

getInstance

public static Transformer getInstance(String methodName, Class[] paramTypes, Object[] args)

Transformer method that performs validation.

Parameters:
methodName - the constructor parameter types
paramTypes - the constructor arguments
args

transform

public Object transform(Object input)

Return the result of instantiating the input Class object.

Parameters:
input