pub enum AttributeInfo {
ConstantValue {
constant_value_index: constant_pool_index,
},
Code {
max_stack: u2,
max_locals: u2,
code: Vec<u1>,
exception_table: Vec<ExceptionTableEntry>,
attributes: Vec<AttributeInfo>,
},
StackMapTable {
entries: Vec<StackMapFrame>,
},
Exceptions {
exception_index_table: Vec<constant_pool_index>,
},
BootstrapMethods {
bootstrap_methods: Vec<BootstrapMethod>,
},
InnerClasses {
classes: Vec<InnerClass>,
},
EnclosingMethod {
class_index: constant_pool_index,
method_index: constant_pool_index,
},
Synthetic,
Signature {
signature_index: constant_pool_index,
},
RuntimeVisibleAnnotations {
annotations: Vec<Annotation>,
},
RuntimeInvisibleAnnotations {
annotations: Vec<Annotation>,
},
RuntimeVisibleParameterAnnotations {
parameter_annotations: Vec<Vec<Annotation>>,
},
RuntimeInvisibleParameterAnnotations {
parameter_annotations: Vec<Vec<Annotation>>,
},
RuntimeVisibleTypeAnnotations {
annotations: Vec<TypeAnnotation>,
},
RuntimeInvisibleTypeAnnotations {
annotations: Vec<TypeAnnotation>,
},
AnnotationDefault {
default_value: ElementValue,
},
MethodParameters {
parameters: Vec<MethodParameter>,
},
SourceFile {
sourcefile_index: constant_pool_index,
},
SourceDebugExtension {
debug_extension: Vec<u1>,
},
LineNumberTable {
line_number_table: Vec<LineNumberInfo>,
},
LocalVariableTable {
local_variable_table: Vec<LocalVariableInfo>,
},
LocalVariableTypeTable {
local_variable_type_table: Vec<LocalVariableTypeInfo>,
},
Deprecated,
Unknown {
attribute_name_index: constant_pool_index,
info: Vec<u1>,
},
}
Attributes are used in the ClassFile
, FieldInfo
, MethodInfo
, and
AttributeInfo::Code
structures of the class file format (§4.1, §4.5, §4.6,
§4.7.3).
Variants
ConstantValue | Fields
| |
Code | Fields
max_stack | | max_locals | | code | | exception_table | | attributes | |
| |
StackMapTable | Fields
| |
Exceptions | Fields
exception_index_table | Contains indices into the constant_pool table for the class type
that the method is declared to throw.
|
| |
BootstrapMethods | Fields
| |
InnerClasses | Fields
| |
EnclosingMethod | Fields
| |
Synthetic | | |
Signature | Fields
signature_index | A valid index into the constant_pool table for a ConstantPoolInfo::Utf8 structure.
|
| |
RuntimeVisibleAnnotations | Fields
| |
RuntimeInvisibleAnnotations | Fields
| |
RuntimeVisibleParameterAnnotations | Fields
| |
RuntimeInvisibleParameterAnnotations | Fields
| |
RuntimeVisibleTypeAnnotations | Fields
| |
RuntimeInvisibleTypeAnnotations | Fields
| |
AnnotationDefault | Fields
| |
MethodParameters | Fields
| |
SourceFile | Fields
| |
SourceDebugExtension | Fields
| |
LineNumberTable | Fields
| |
LocalVariableTable | Fields
| |
LocalVariableTypeTable | Fields
local_variable_type_table | |
| |
Deprecated | | |
Unknown | Fields
attribute_name_index | A valid index into the constant_pool table. The constant_pool
entry at that index must be a valid ConstantPoolInfo::Utf8
structure representing the name of the attribute.
| info | The data for this attribute.
|
| |
Trait Implementations
Derived Implementations