Package org.infinispan.counter.api
Class CounterType$___Marshaller_4dd4ef0972bf79fd96da56b8ce9348d84b1c42596acd7df3abf86c5e467887f5
- java.lang.Object
-
- org.infinispan.counter.api.CounterType$___Marshaller_4dd4ef0972bf79fd96da56b8ce9348d84b1c42596acd7df3abf86c5e467887f5
-
- All Implemented Interfaces:
BaseMarshaller<CounterType>,EnumMarshaller<CounterType>
public final class CounterType$___Marshaller_4dd4ef0972bf79fd96da56b8ce9348d84b1c42596acd7df3abf86c5e467887f5 extends Object implements EnumMarshaller<CounterType>
-
-
Constructor Summary
Constructors Constructor Description CounterType$___Marshaller_4dd4ef0972bf79fd96da56b8ce9348d84b1c42596acd7df3abf86c5e467887f5()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CounterTypedecode(int $1)Decodes an integer enum value read from a Protobuf encoded stream into a Java enum instance.intencode(CounterType $1)Encodes a JavaEnuminto its corresponding Protobuf numeric value.Class<CounterType>getJavaClass()Returns the Java type handled by this marshaller.StringgetTypeName()Returns the full name of the message or enum type, defined in a proto file.
-
-
-
Method Detail
-
getJavaClass
public Class<CounterType> getJavaClass()
Description copied from interface:BaseMarshallerReturns the Java type handled by this marshaller. This must not change over multiple invocations.- Specified by:
getJavaClassin interfaceBaseMarshaller<CounterType>- Returns:
- the Java type.
-
getTypeName
public String getTypeName()
Description copied from interface:BaseMarshallerReturns the full name of the message or enum type, defined in a proto file. This must not change over multiple invocations.- Specified by:
getTypeNamein interfaceBaseMarshaller<CounterType>- Returns:
- the full name of the message or enum type, defined in a proto file.
-
decode
public CounterType decode(int $1)
Description copied from interface:EnumMarshallerDecodes an integer enum value read from a Protobuf encoded stream into a Java enum instance.If the numeric value is not recognized the method must return
nullto signal this to the library and allow the unrecognized data to be preserved. No exception should be thrown in this case.- Specified by:
decodein interfaceEnumMarshaller<CounterType>- Parameters:
$1- the Protobuf enum value to decode- Returns:
- a Java
Enuminstance if the value is recognized ornullotherwise.
-
encode
public int encode(CounterType $1) throws IllegalArgumentException
Description copied from interface:EnumMarshallerEncodes a JavaEnuminto its corresponding Protobuf numeric value.- Specified by:
encodein interfaceEnumMarshaller<CounterType>- Parameters:
$1- anEnuminstance- Returns:
- the corresponding numeric value from the Protobuf definition of the enum.
- Throws:
IllegalArgumentException- if the given Enum argument is of an unexpected type or its value has no correspondence to a Protobuf enum value (this is a programming error, not a schema evolution issue).
-
-