use java_asm_macro::{ReadFrom, WriteInto};
#[derive(Clone, Debug, ReadFrom, WriteInto)]
pub struct AnnotationInfo {
pub type_index: u16,
pub num_element_value_pairs: u16,
#[index(num_element_value_pairs)]
pub element_value_pairs: Vec<AnnotationElement>,
}
#[derive(Clone, Debug, ReadFrom, WriteInto)]
pub struct AnnotationElement {
pub element_name_index: u16,
pub value: AnnotationElementValueInfo,
}
#[derive(Clone, Debug, WriteInto)]
pub struct AnnotationElementValueInfo {
pub tag: u8,
pub value: AnnotationElementValue,
}
#[derive(Clone, Debug, WriteInto)]
pub enum AnnotationElementValue {
Const { const_value_index: u16 },
EnumConst { type_name_index: u16, const_name_index: u16 },
Class { class_info_index: u16 },
Annotation { annotation_value: AnnotationInfo },
Array { num_values: u16, values: Vec<AnnotationElementValueInfo> },
}
#[derive(Clone, Debug, ReadFrom, WriteInto)]
pub struct ParameterAnnotationInfo {
pub num_annotations: u16,
#[index(num_annotations)]
pub annotations: Vec<AnnotationInfo>,
}