jp.develop.common.util.amf
Class AmfDecoderOption

java.lang.Object
  extended by jp.develop.common.util.amf.AmfDecoderOption

public class AmfDecoderOption
extends Object

Configuration option for AmfDecoder.

Author:
Waki Takeya
See Also:
AmfDecoder

Constructor Summary
AmfDecoderOption()
          Constructs a instance with default object writer, array writer and converter.
AmfDecoderOption(IObjectWriter objectWriter, IArrayWriter arrayWriter, Converter converter)
          Constructs a instance with specified object writer, array writer and converter.
 
Method Summary
<T> T
conver(Class<T> clazz, Object instance)
          Convert instance to specified class.
 IArrayWriter getArrayWriter()
          Get array writer.
static AmfDecoderOption getDefault()
          Get default configuration option.
 IObjectWriter getObjectWriter()
          Get object writer.
 boolean isVerbose()
          Get the value of verbose.
 void setVerbose(boolean verbose)
          Set the value of verbose.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AmfDecoderOption

public AmfDecoderOption()
Constructs a instance with default object writer, array writer and converter.


AmfDecoderOption

public AmfDecoderOption(IObjectWriter objectWriter,
                        IArrayWriter arrayWriter,
                        Converter converter)
Constructs a instance with specified object writer, array writer and converter.

Parameters:
objectWriter - Object writer.
arrayWriter - Array writer.
converter - Converter.
Method Detail

getDefault

public static AmfDecoderOption getDefault()
Get default configuration option.

Returns:
Default configuration option.

getObjectWriter

public IObjectWriter getObjectWriter()
Get object writer.

Returns:
Object writer.

getArrayWriter

public IArrayWriter getArrayWriter()
Get array writer.

Returns:
Array writer.

isVerbose

public boolean isVerbose()
Get the value of verbose.

Returns:
true for verbose.

setVerbose

public void setVerbose(boolean verbose)
Set the value of verbose.

Parameters:
verbose - true for verbose.

conver

public <T> T conver(Class<T> clazz,
                    Object instance)
Convert instance to specified class. Internally, this request is forwarded to the converter specified by constructor.

Type Parameters:
T - Target type of conversion.
Parameters:
clazz - The target class of conversion.
instance - The target instance of conversion.
Returns:
The instance converted to specified class.