JBoss Modular Service Kernel API 1.0.0.Beta4-SNAPSHOT

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

java.lang.Object
  extended by org.jboss.msc.translate.ConstructionTranslator<I,O>
Type Parameters:
I - the input type
O - the output type
All Implemented Interfaces:
Translator<I,O>

public final class ConstructionTranslator<I,O>
extends Object
implements Translator<I,O>

A translator which translates by constructing a new value and returning it. The input value may be passed in to the constructor using Values.injectedValue().

Author:
David M. Lloyd

Constructor Summary
ConstructionTranslator(Value<Constructor<? extends O>> constructor, 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

ConstructionTranslator

public ConstructionTranslator(Value<Constructor<? extends O>> constructor,
                              List<? extends Value<?>> parameters)
Construct a new instance.

Parameters:
constructor - the constructor value to use
parameters - the parameters, possibly including 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.