JBoss Modular Service Kernel API 1.0.0.Beta4-SNAPSHOT

org.jboss.msc.translate
Class MethodTraversingTranslator<I,O>

java.lang.Object
  extended by org.jboss.msc.translate.MethodTraversingTranslator<I,O>
Type Parameters:
I - the input type
O - 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

Constructor Summary
MethodTraversingTranslator(Value<Method> method, Value<?> target, List<? extends Value<?>> parameters)
          Construct a new instance.
 
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
 

Constructor Detail

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())
Method Detail

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

JBoss Modular Service Kernel API 1.0.0.Beta4-SNAPSHOT

Copyright © 2010 JBoss, a division of Red Hat, Inc.