org.milyn.javabean
Class DataDecoder.Factory

java.lang.Object
  extended by org.milyn.javabean.DataDecoder.Factory
Enclosing interface:
DataDecoder

public static class DataDecoder.Factory
extends Object

Factory method for constructing decoders defined in the "decoders" package.


Constructor Summary
DataDecoder.Factory()
           
 
Method Summary
static DataDecoder create(Class targetType)
           
static DataDecoder create(String typeAlias)
          Attempt to construct a decoder instance from it's type alias based on the packaging and naming convention used in the org.milyn.javabean.decoders package.
static Map<Class,Class<? extends DataDecoder>> getInstalledDecoders()
          Get the full set of installed decoders, keyed by the decode type.
static Class<? extends DataDecoder> getInstance(Class targetType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataDecoder.Factory

public DataDecoder.Factory()
Method Detail

create

public static DataDecoder create(Class targetType)
                          throws DataDecodeException
Throws:
DataDecodeException

getInstance

public static Class<? extends DataDecoder> getInstance(Class targetType)

getInstalledDecoders

public static Map<Class,Class<? extends DataDecoder>> getInstalledDecoders()
Get the full set of installed decoders, keyed by the decode type.

Returns:
The set of installed decoders, keyed by the decode type.

create

public static DataDecoder create(String typeAlias)
                          throws DataDecodeException
Attempt to construct a decoder instance from it's type alias based on the packaging and naming convention used in the org.milyn.javabean.decoders package.

Parameters:
typeAlias - Decoder alias used to construct an instance by prefixing the alias with the "decoders" package and suffixing it with the word "Decoder".
Returns:
The DateDecoder instance, or null if no such instance is available.
Throws:
DataDecodeException - Failed to load alias decoder.


Copyright © 2018. All rights reserved.