Expand description
Zero-copy parser for JVM class files (Java 1.1 - 8, major versions 45-52).
The entry point is Class::parse; the returned tree borrows from the
input buffer instead of copying it.
Everything here follows chapter 4 of The Java Virtual Machine Specification, Java SE 8 Edition.
Structs§
- Annotation
- A single annotation with its element values.
- Bootstrap
Method - One entry of a
BootstrapMethodsattribute. - Cesu8
Bytes - Borrowed CESU-8 (“modified UTF-8”) bytes of a
Utf8constant. - Class
- A parsed class file, borrowing from the bytes it was read from.
- Class
Access Flags - Access flags of a class.
- Constant
Pool - Constant pool of a class file, indexed from 1.
- Cursor
- Cursor over a borrowed byte slice, reading big-endian values from the front.
- Element
Value Pair - A named element of an annotation.
- Exception
Handler - One entry of a
Codeexception table. - Field
Access Flags - Access flags of a field.
- Field
Info - A single field of a class.
- Inner
Class - One entry of an
InnerClassesattribute. - Inner
Class Access Flags - Access flags of an inner class.
- Line
Number - Mapping of a bytecode offset to a source line.
- Local
VarTarget - Range of a local variable targeted by a type annotation.
- Local
Variable - One entry of a
LocalVariableTableattribute. - Local
Variable Type - One entry of a
LocalVariableTypeTableattribute. - Method
Access Flags - Access flags of a method.
- Method
Info - A single method of a class.
- Method
Parameter - One entry of a
MethodParametersattribute. - Method
Parameter Access Flags - Access flags of a method parameter.
- Type
Annotation - An annotation attached to a use of a type.
- Type
Path - Path from a type to the nested part an annotation applies to.
- Type
Path Entry - One step of a
TypePath.
Enums§
- Attribute
Info - An attribute of a class, field, method or
Codeblock. - Constant
Pool Info - A single constant pool entry.
- Constant
Pool Tag - Tag byte identifying the kind of a
ConstantPoolInfo. - Element
Value - Value of an annotation element.
- Error
- Anything that can go wrong while parsing a class file.
- Reference
Kind - Kind of a
MethodHandlereference. - Stack
MapFrame - One frame of a
StackMapTableattribute. - Type
Annotation Target - What a
TypeAnnotationis attached to. - Verification
Type Info - Type of a local variable or stack slot inside a stack map frame.
- Verification
Type Tag - Tag byte identifying the kind of a
VerificationTypeInfo.
Traits§
- Read
Bytes - Big-endian reading primitives shared by every parser in this crate.
Type Aliases§
- CpIndex
- Index into the
ConstantPool, starting at 1. - Result
- Result of any parsing operation in this crate.