Class LoadedClassField
- java.lang.Object
-
- org.wildfly.clustering.marshalling.protostream.LoadedClassField
-
- All Implemented Interfaces:
Field<Class<?>>,FieldMarshaller<Class<?>>,Marshallable<Class<?>>
public class LoadedClassField extends Object implements Field<Class<?>>, FieldMarshaller<Class<?>>
A class field that marshals instances ofClassusing aClassLoaderMarshaller.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description LoadedClassField(ClassLoaderMarshaller loaderMarshaller, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetIndex()Returns the index of this field.Class<? extends Class<?>>getJavaClass()Returns the type of object handled by this marshallable instance.FieldMarshaller<Class<?>>getMarshaller()Returns the marshaller for this field.org.infinispan.protostream.descriptors.WireTypegetWireType()Returns the wire type of the scalar value written by this marshaller.Class<?>readFrom(ProtoStreamReader reader)Reads an object from the specified reader.voidwriteTo(ProtoStreamWriter writer, Class<?> targetClass)Writes the specified object to the specified writer.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.clustering.marshalling.protostream.Marshallable
size
-
-
-
-
Constructor Detail
-
LoadedClassField
public LoadedClassField(ClassLoaderMarshaller loaderMarshaller, int index)
-
-
Method Detail
-
getMarshaller
public FieldMarshaller<Class<?>> getMarshaller()
Description copied from interface:FieldReturns the marshaller for this field.- Specified by:
getMarshallerin interfaceField<Class<?>>- Returns:
- the marshaller for this field.
-
readFrom
public Class<?> readFrom(ProtoStreamReader reader) throws IOException
Description copied from interface:MarshallableReads an object from the specified reader.- Specified by:
readFromin interfaceMarshallable<Class<?>>- Parameters:
reader- a ProtoStream reader- Returns:
- the read object
- Throws:
IOException- if the object could not be read
-
writeTo
public void writeTo(ProtoStreamWriter writer, Class<?> targetClass) throws IOException
Description copied from interface:MarshallableWrites the specified object to the specified writer.- Specified by:
writeToin interfaceMarshallable<Class<?>>- Parameters:
writer- a ProtoStream writertargetClass- the object to be written- Throws:
IOException- if the object could not be written
-
getJavaClass
public Class<? extends Class<?>> getJavaClass()
Description copied from interface:MarshallableReturns the type of object handled by this marshallable instance.- Specified by:
getJavaClassin interfaceMarshallable<Class<?>>- Returns:
- the type of object handled by this marshallable instance.
-
getIndex
public int getIndex()
Description copied from interface:FieldReturns the index of this field.
-
getWireType
public org.infinispan.protostream.descriptors.WireType getWireType()
Description copied from interface:FieldMarshallerReturns the wire type of the scalar value written by this marshaller.- Specified by:
getWireTypein interfaceFieldMarshaller<Class<?>>- Returns:
- the wire type of the scalar value written by this marshaller.
-
-