org.jboss.msc.translate
Class MethodTraversingTranslator<I,O>
java.lang.Object
org.jboss.msc.translate.MethodTraversingTranslator<I,O>
- Type Parameters:
I - the input typeO - the output type
- All Implemented Interfaces:
- Translator<I,O>
public final class MethodTraversingTranslator<I,O>
- extends Object
- implements Translator<I,O>
A translator which translates by calling a method and returning its return value. The input value may be passed in to
the constructor using Values.injectedValue().
- Author:
- David M. Lloyd
|
Method Summary |
O |
translate(I input)
Translate an input value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodTraversingTranslator
public MethodTraversingTranslator(Value<Method> method,
Value<?> target,
List<? extends Value<?>> parameters)
- Construct a new instance.
- Parameters:
method - the method to invoke (possibly Values.injectedValue())target - the target (possibly Values.injectedValue())parameters - the parameters (one or more of which may be Values.injectedValue())
translate
public O translate(I input)
- Translate an input value.
- Specified by:
translate in interface Translator<I,O>
- Parameters:
input - the input value
- Returns:
- the output value
Copyright © 2010 JBoss, a division of Red Hat, Inc.