Class GenericValueEncoderFactory<V>
- java.lang.Object
-
- org.apache.tapestry5.internal.services.GenericValueEncoderFactory<V>
-
- Type Parameters:
V
- the type of the value.
- All Implemented Interfaces:
ValueEncoderFactory<V>
public class GenericValueEncoderFactory<V> extends java.lang.Object implements ValueEncoderFactory<V>
An implementation ofValueEncoderFactory
that returns a pre-wired instance ofValueEncoder
. This is odd for a factory, because it doesn't actually create the returned instance, just stores it until the encoder is needed.
-
-
Constructor Summary
Constructors Constructor Description GenericValueEncoderFactory(ValueEncoder<V> encoder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueEncoder<V>
create(java.lang.Class<V> type)
For a given type, create an encoder.static <V> GenericValueEncoderFactory<V>
create(ValueEncoder<V> encoder)
-
-
-
Constructor Detail
-
GenericValueEncoderFactory
public GenericValueEncoderFactory(ValueEncoder<V> encoder)
-
-
Method Detail
-
create
public ValueEncoder<V> create(java.lang.Class<V> type)
Description copied from interface:ValueEncoderFactory
For a given type, create an encoder.- Specified by:
create
in interfaceValueEncoderFactory<V>
- Parameters:
type
- type of object for which an encoder is needed- Returns:
- the encoder for the object
-
create
public static <V> GenericValueEncoderFactory<V> create(ValueEncoder<V> encoder)
-
-