public interface ImmutableSerializationContext
Modifier and Type | Method and Description |
---|---|
boolean |
canMarshall(Class<?> javaClass)
Checks if the given type (message or enum) can be marshalled.
|
boolean |
canMarshall(String fullTypeName)
Checks if the given type (message or enum) can be marshalled.
|
GenericDescriptor |
getDescriptorByName(String fullTypeName) |
GenericDescriptor |
getDescriptorByTypeId(Integer typeId)
Obtains the type name associated with a numeric type id.
|
EnumDescriptor |
getEnumDescriptor(String fullTypeName) |
Map<String,FileDescriptor> |
getFileDescriptors()
Obtain the currently registered file descriptors.
|
<T> BaseMarshaller<T> |
getMarshaller(Class<T> clazz) |
<T> BaseMarshaller<T> |
getMarshaller(String fullTypeName) |
Descriptor |
getMessageDescriptor(String fullTypeName) |
Integer |
getTypeIdByName(String fullTypeName)
Obtains the associated numeric type id, if one was defined.
|
String |
getTypeNameById(Integer typeId)
Obtains the type name associated with a numeric type id.
|
Map<String,FileDescriptor> getFileDescriptors()
Descriptor getMessageDescriptor(String fullTypeName)
IllegalArgumentException
- if the descriptor is not found or is not a messageEnumDescriptor getEnumDescriptor(String fullTypeName)
IllegalArgumentException
- if the descriptor is not found or is not an enumboolean canMarshall(Class<?> javaClass)
javaClass
- the object or enum class to checktrue
if a marshaller exists, false
otherwiseboolean canMarshall(String fullTypeName)
fullTypeName
- the fully qualified name of the protobuf definition to checktrue
if a marshaller exists, false
otherwise<T> BaseMarshaller<T> getMarshaller(String fullTypeName)
<T> BaseMarshaller<T> getMarshaller(Class<T> clazz)
String getTypeNameById(Integer typeId)
typeId
- the numeric type idIllegalArgumentException
- if the given type id is unknownInteger getTypeIdByName(String fullTypeName)
fullTypeName
- the fully qualified type namenull
if no type id is associated with the typeIllegalArgumentException
- if the given type name is unknownGenericDescriptor getDescriptorByTypeId(Integer typeId)
typeId
- the numeric type idIllegalArgumentException
- if the given type id is unknownGenericDescriptor getDescriptorByName(String fullTypeName)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.