Crate jdescriptor

Source
Expand description

§jdescriptor - A Java Bytecode Descriptor Parser for Rust

jdescriptor is a Rust library for parsing and formatting Java bytecode descriptors. It provides robust support for handling Java type and method descriptors while leveraging Rust’s strong type system and error-handling capabilities.

§Features

  • Comprehensive Descriptor Parsing

    • Supports Java type descriptors, including primitive types, object types, and arrays.
    • Parses Java method descriptors, extracting parameter types and return types.
  • String Representations

    • Implements Display for converting parsed descriptors back into Java-style string representations.
  • Error Handling

    • Provides structured error types (DescriptorError) for clear and precise error reporting.
  • Idiomatic Rust API

    • Implements FromStr for easy descriptor parsing using standard Rust conventions.
  • Well-Tested

    • Includes extensive unit tests to ensure correctness and reliability.

Structs§

MethodDescriptor
Represents a Java method descriptor consisting of parameter types and a return type.

Enums§

DescriptorError
Custom error types for descriptor parsing.
TypeDescriptor
Represents a Java type descriptor, which can be a primitive type, an array, or an object type.