public class CoderWrapper<T> extends CoderAdapter implements Decoder, Encoder
Decoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>
Encoder.Binary<T>, Encoder.BinaryStream<T>, Encoder.Text<T>, Encoder.TextStream<T>
Constructor and Description |
---|
CoderWrapper(java.lang.Class<? extends T> coderClass,
java.lang.Class<?> type)
Construct new coder wrapper.
|
CoderWrapper(T coder,
java.lang.Class<?> type)
Construct new coder wrapper.
|
Modifier and Type | Method and Description |
---|---|
T |
getCoder()
Get coder instance.
|
java.lang.Class<? extends T> |
getCoderClass()
Get coder class.
|
java.lang.Class<?> |
getType()
Get the return type of the encode / decode method.
|
java.lang.String |
toString() |
destroy, init
public CoderWrapper(java.lang.Class<? extends T> coderClass, java.lang.Class<?> type)
coderClass
- coder class.type
- return type provided by the encode / decode method. Cannot be null
.public CoderWrapper(T coder, java.lang.Class<?> type)
coder
- cannot be null
.type
- return type provided by the encode / decode method. Cannot be null
.public java.lang.Class<?> getType()
public java.lang.Class<? extends T> getCoderClass()
public T getCoder()
null
if registered using coder class.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2012–2020 Oracle Corporation. All rights reserved.