public interface ImmutableSerializationContext
Modifier and Type | Method and Description |
---|---|
boolean |
canMarshall(Class<?> clazz)
Checks if the given type (message or enum) can be marshalled.
|
boolean |
canMarshall(String fullName)
Checks if the given type (message or enum) can be marshalled.
|
GenericDescriptor |
getDescriptorByName(String fullName) |
GenericDescriptor |
getDescriptorByTypeId(Integer typeId)
Obtains the type name associated with a numeric type id.
|
EnumDescriptor |
getEnumDescriptor(String fullName) |
Map<String,FileDescriptor> |
getFileDescriptors()
Obtain the registered file descriptors.
|
<T> BaseMarshaller<T> |
getMarshaller(Class<T> clazz) |
<T> BaseMarshaller<T> |
getMarshaller(String fullName) |
Descriptor |
getMessageDescriptor(String fullName) |
Integer |
getTypeIdByName(String fullName)
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 fullName)
EnumDescriptor getEnumDescriptor(String fullName)
boolean canMarshall(Class<?> clazz)
clazz
- the object or enum class to checktrue
if a marshaller exists, false
otherwiseboolean canMarshall(String fullName)
fullName
- the fully qualified name of the protobuf definition to checktrue
if a marshaller exists, false
otherwise<T> BaseMarshaller<T> getMarshaller(String fullName)
<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 fullName)
fullName
- 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 fullName)
Copyright © 2017 JBoss, a division of Red Hat. All rights reserved.