org.apache.tapestry5.internal.services
Class GenericValueEncoderFactory<V>
java.lang.Object
org.apache.tapestry5.internal.services.GenericValueEncoderFactory<V>
- Type Parameters:
V
-
- All Implemented Interfaces:
- ValueEncoderFactory<V>
public class GenericValueEncoderFactory<V>
- extends Object
- implements ValueEncoderFactory<V>
An implementation of ValueEncoderFactory
that returns a pre-wired instance of ValueEncoder
. This is
odd for a factory, because it doesn't actually create the returned instance, just stores it until the encoder is
needed.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericValueEncoderFactory
public GenericValueEncoderFactory(ValueEncoder<V> encoder)
create
public ValueEncoder<V> create(Class<V> type)
- Description copied from interface:
ValueEncoderFactory
- For a given type, create an encoder.
- Specified by:
create
in interface ValueEncoderFactory<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)
Copyright © 2003-2012 The Apache Software Foundation.