Expand description
Java binary name parser and writer.
§Parsing
Types who implemented Parse trait could be parsed from a string slice using parse function.
Differences between JLS and class file representation will be handled automatically.
§Error Handling
This crate won’t handle naming errors unless necessary. Validate the string slices after parse if desired.
§Writing
Use Display or ToString for writing.
§Supported Items
-
Classes or interfaces:
ClassName -
Methods:
MethodDescriptor -
Field types:
FieldType -
Type signatures:
TypeSignature -
Class signatures:
ClassSignature -
Method signatures:
MethodSignature -
Field signatures:
FieldSignature
Structs§
- Canonical
Class Name - Canonical, or fully qualified name of a class or interface.
- Class
Signature - Signature of a class or interface declaration.
- Cursor
- Cursor of a string slice.
- Method
Descriptor - Descriptor of a method despite of its signature.
- Method
Signature - Signature of a method declaration.
- Reduced
Class Type Signature - Signature of a class type.
- Type
Argument - Type of an (generic) argument.
- Type
Parameter - Generic parameter of a class or method.
- Unknown
Type Tag - Error type marking the leading character of a type descriptor is invalid.
Enums§
- Class
Name - Binary name of a class or interface.
- Field
Type - The type of a field, parameter, local variable, or value.
- Invalid
Class Signature - Errors encountered while parsing a class signature.
- Invalid
Method Descriptor - Error thrown when parsing a method descriptor.
- Invalid
Method Signature - Errors encountered while parsing a method signature.
- Method
Return Descriptor - Method return type.
- Method
Return Signature - Result section in a method signature.
- Primitive
Type - A primitive type of Java language.
- Repr
Form - Representation form of a component across different contexts.
- Type
Argument Kind - Kind of a type argument that is not full wildcard.
- Type
Signature - Signature of a Java type.
Traits§
- Parse
- Types that could be parsed from a borrowed string cursor.
Functions§
- parse
- Parses a name.
Type Aliases§
- Field
Signature - Signature of a field, formal parameter, local variable, or record component declaration.