Expand description
Annotation attribute parser for JVM bytecode.
Converts cafebabe’s parsed annotation structures into the sqry stub model
types (AnnotationStub, AnnotationElement, AnnotationElementValue).
This module handles the four annotation attribute types defined in JVMS 4.7.16-4.7.19:
RuntimeVisibleAnnotations(is_runtime_visible = true)RuntimeInvisibleAnnotations(is_runtime_visible = false)RuntimeVisibleParameterAnnotations(is_runtime_visible = true)RuntimeInvisibleParameterAnnotations(is_runtime_visible = false)
§Type Descriptor Conversion
Annotation type descriptors in JVM bytecode use the internal form
(e.g., Lorg/springframework/web/bind/annotation/RequestMapping;).
These are converted to FQN dot-notation
(e.g., org.springframework.web.bind.annotation.RequestMapping).
Functions§
- convert_
annotations - Convert a list of cafebabe
Annotationvalues intoAnnotationStubrecords. - convert_
parameter_ annotations - Convert a list of cafebabe
ParameterAnnotationvalues into nestedVec<Vec<AnnotationStub>>records. - extract_
annotations_ from_ attribute - Extract all annotations from a cafebabe
AttributeDatavalue. - extract_
parameter_ annotations_ from_ attribute - Extract parameter annotations from a cafebabe
AttributeDatavalue.