Skip to main content

Crate jvm_class

Crate jvm_class 

Source
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.
BootstrapMethod
One entry of a BootstrapMethods attribute.
Cesu8Bytes
Borrowed CESU-8 (“modified UTF-8”) bytes of a Utf8 constant.
Class
A parsed class file, borrowing from the bytes it was read from.
ClassAccessFlags
Access flags of a class.
ConstantPool
Constant pool of a class file, indexed from 1.
Cursor
Cursor over a borrowed byte slice, reading big-endian values from the front.
ElementValuePair
A named element of an annotation.
ExceptionHandler
One entry of a Code exception table.
FieldAccessFlags
Access flags of a field.
FieldInfo
A single field of a class.
InnerClass
One entry of an InnerClasses attribute.
InnerClassAccessFlags
Access flags of an inner class.
LineNumber
Mapping of a bytecode offset to a source line.
LocalVarTarget
Range of a local variable targeted by a type annotation.
LocalVariable
One entry of a LocalVariableTable attribute.
LocalVariableType
One entry of a LocalVariableTypeTable attribute.
MethodAccessFlags
Access flags of a method.
MethodInfo
A single method of a class.
MethodParameter
One entry of a MethodParameters attribute.
MethodParameterAccessFlags
Access flags of a method parameter.
TypeAnnotation
An annotation attached to a use of a type.
TypePath
Path from a type to the nested part an annotation applies to.
TypePathEntry
One step of a TypePath.

Enums§

AttributeInfo
An attribute of a class, field, method or Code block.
ConstantPoolInfo
A single constant pool entry.
ConstantPoolTag
Tag byte identifying the kind of a ConstantPoolInfo.
ElementValue
Value of an annotation element.
Error
Anything that can go wrong while parsing a class file.
ReferenceKind
Kind of a MethodHandle reference.
StackMapFrame
One frame of a StackMapTable attribute.
TypeAnnotationTarget
What a TypeAnnotation is attached to.
VerificationTypeInfo
Type of a local variable or stack slot inside a stack map frame.
VerificationTypeTag
Tag byte identifying the kind of a VerificationTypeInfo.

Traits§

ReadBytes
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.