Enum Class AppMain
- All Implemented Interfaces:
Serializable
,Comparable<AppMain>
,Constable
Desktop application offering the functionality of the
ProtoToJson
-API.
The user has the option to select a binary protobuf message which the application will then attempt to decode into readable JSON. The result will then be displayed in an advanced text editor window for further processing.
Message decoding requires protobuf descriptors that are put into the CACHE_DIRECTORY
in advance by the user.
Such descriptors can be obtained by applying a protoc
command on the protobuf schema .proto
, for
example:
protoc --descriptor_set_out foo.desc foo.proto
- Author:
- Daniel Tischner <zabuza.dev@gmail.com>
-
Field Details
-
CACHE_DIRECTORY
The directory to use for the descriptor cache.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
main
Starts the desktop application.Prior to using this, the user has to populate the
CACHE_DIRECTORY
with protobuf descriptor files. Such descriptors can be obtained by applying aprotoc
command on the protobuf schema.proto
, for example:
The user has the option to select a binary protobuf message which the application will then attempt to decode into readable JSON. The result will then be displayed in an advanced text editor window for further processing.protoc --descriptor_set_out foo.desc foo.proto
- Parameters:
args
- Null or empty if the user should be given the option to select a binary protobuf message. Otherwise one argument which is the path to the binary protobuf message to convert, the application will then directly proceed to decoding this message instead of asking the user for a message first.
-