Example usage for org.apache.commons.collections TransformerUtils invokerTransformer

List of usage examples for org.apache.commons.collections TransformerUtils invokerTransformer

Introduction

In this page you can find the example usage for org.apache.commons.collections TransformerUtils invokerTransformer.

Prototype

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

Source Link

Document

Gets a Transformer that invokes a method on the input object.

Usage

From source file:TransformerExampleV1.java

public static void main(String args[]) {
    Transformer transformer = TransformerUtils.invokerTransformer("append", new Class[] { String.class },
            new Object[] { " a Transformer?" });
    Object newObject = transformer.transform(new StringBuffer("Are you"));
    System.err.println(newObject);
}