Top Description Fields Constructors Methods
com.fasterxml.jackson.dataformat.protobuf.schema

public Class NativeProtobufSchema

extends Object
Class Inheritance
Imports
java.util.*, com.squareup.protoparser.*

Helper class used for wrapping a "raw" protobuf schema (as read by "protoparser" library); and used as input for creating specific ProtobufSchema to use for reading/writing protobuf encoded content

Field Summary

Modifier and TypeField and Description
protected volatile String[]
protected final String
protected final Collection<TypeElement>

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
protected MessageElement
private String[]
protected MessageElement
public static NativeProtobufSchema
public static NativeProtobufSchema
public ProtobufSchema
forFirstType()

Factory method for constructing Jackson-digestible schema using the first Message type defined in the underlying native protobuf schema.

public ProtobufSchema
forType(String messageTypeName)

Factory method for constructing Jackson-digestible schema using specified Message type from native protobuf schema.

public List<String>
public boolean
hasMessageType(String messageTypeName)

Method for checking whether specified message type is defined by the native schema

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_messageNamesback to summary
protected volatile String[] _messageNames
_nameback to summary
protected final String _name
_nativeTypesback to summary
protected final Collection<TypeElement> _nativeTypes

Constructor Detail

NativeProtobufSchemaback to summary
protected NativeProtobufSchema(ProtoFile input)
NativeProtobufSchemaback to summary
protected NativeProtobufSchema(String name, Collection<TypeElement> types)

Method Detail

_firstMessageTypeback to summary
protected MessageElement _firstMessageType()
_getMessageNamesback to summary
private String[] _getMessageNames()
_messageTypeback to summary
protected MessageElement _messageType(String name)
constructback to summary
public static NativeProtobufSchema construct(ProtoFile input)
constructback to summary
public static NativeProtobufSchema construct(String name, Collection<TypeElement> types)
forFirstTypeback to summary
public ProtobufSchema forFirstType()

Factory method for constructing Jackson-digestible schema using the first Message type defined in the underlying native protobuf schema.

forTypeback to summary
public ProtobufSchema forType(String messageTypeName)

Factory method for constructing Jackson-digestible schema using specified Message type from native protobuf schema.

getMessageNamesback to summary
public List<String> getMessageNames()
hasMessageTypeback to summary
public boolean hasMessageType(String messageTypeName)

Method for checking whether specified message type is defined by the native schema

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
toStringback to summary
public String toString(String name)