public class DecoratorMarshaller<T> extends Object implements ProtoStreamMarshaller<T>, org.wildfly.security.ParametricPrivilegedAction<T,T>
| Constructor and Description |
|---|
DecoratorMarshaller(Class<T> decoratedClass,
UnaryOperator<T> decorator,
T sample)
Constructs a decorator marshaller.
|
| Modifier and Type | Method and Description |
|---|---|
Class<? extends T> |
getJavaClass()
Returns the type of object handled by this marshallable instance.
|
T |
readFrom(ProtoStreamReader reader)
Reads an object from the specified reader.
|
T |
run(T value) |
void |
writeTo(ProtoStreamWriter writer,
T value)
Writes the specified object to the specified writer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypeName, read, writepublic DecoratorMarshaller(Class<T> decoratedClass, UnaryOperator<T> decorator, T sample)
decoratedClass - the generalized type of the decorated objectdecorator - the decoration functionsample - a sample object used to determine the type of the decorated objectpublic Class<? extends T> getJavaClass()
MarshallablegetJavaClass in interface org.infinispan.protostream.BaseMarshaller<T>getJavaClass in interface Marshallable<T>public T readFrom(ProtoStreamReader reader) throws IOException
MarshallablereadFrom in interface Marshallable<T>reader - a ProtoStream readerIOException - if the object could not be readpublic void writeTo(ProtoStreamWriter writer, T value) throws IOException
MarshallablewriteTo in interface Marshallable<T>writer - a ProtoStream writervalue - the object to be writtenIOException - if the object could not be writtenCopyright © 2021 JBoss by Red Hat. All rights reserved.