Enum Scalar
- All Implemented Interfaces:
Serializable,Comparable<Scalar>,java.lang.constant.Constable,Marshallable<Object>,Readable<Object>,ScalarMarshaller<Object>,Writable<Object>
Enumeration of common scalar marshaller implementations.
- Author:
- Paul Ferraro
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescription<T> ScalarMarshaller<T> Returns the type of object handled by this marshallable instance.org.infinispan.protostream.descriptors.WireTypeReturns the wire type of the scalar value written by this marshaller.readFrom(ProtoStreamReader reader) Reads an object from the specified reader.size(ProtoStreamSizeOperation operation, Object value) Computes the size of the specified object.static ScalarReturns the enum constant of this type with the specified name.static Scalar[]values()Returns an array containing the constants of this enum type, in the order they are declared.voidwriteTo(ProtoStreamWriter writer, Object value) Writes the specified object to the specified writer.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface org.wildfly.clustering.marshalling.protostream.ScalarMarshaller
toMarshaller, toMarshaller, toMarshaller, toMarshaller
-
Enum Constant Details
-
ANY
-
BOOLEAN
-
BYTE
-
SHORT
-
INTEGER
-
LONG
-
FLOAT
-
DOUBLE
-
CHARACTER
-
BYTE_BUFFER
-
BYTE_ARRAY
-
STRING
-
REFERENCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getJavaClass
Description copied from interface:MarshallableReturns the type of object handled by this marshallable instance.- Specified by:
getJavaClassin interfaceMarshallable<Object>- Returns:
- the type of object handled by this marshallable instance.
-
getWireType
public org.infinispan.protostream.descriptors.WireType getWireType()Description copied from interface:ScalarMarshallerReturns the wire type of the scalar value written by this marshaller.- Specified by:
getWireTypein interfaceScalarMarshaller<Object>- Returns:
- the wire type of the scalar value written by this marshaller.
-
readFrom
Description copied from interface:ReadableReads an object from the specified reader.- Specified by:
readFromin interfaceReadable<Object>- Parameters:
reader- a ProtoStream reader- Returns:
- the read object
- Throws:
IOException- if the object could not be read
-
writeTo
Description copied from interface:WritableWrites the specified object to the specified writer.- Specified by:
writeToin interfaceWritable<Object>- Parameters:
writer- a ProtoStream writervalue- the object to be written- Throws:
IOException- if the object could not be written
-
size
Description copied from interface:MarshallableComputes the size of the specified object.- Specified by:
sizein interfaceMarshallable<Object>- Parameters:
value- the value whose size is to be calculated- Returns:
- an optional buffer size, only present if the buffer size could be computed
-
cast
-