add test
This commit is contained in:
parent
d47494f8f6
commit
ef6a2196a7
6 changed files with 580 additions and 9 deletions
|
|
@ -71,6 +71,36 @@ pub enum MapItemType {
|
|||
UnkownType(u16),
|
||||
}
|
||||
|
||||
impl MapItemType {
|
||||
/// If data of this type is stored in the data section
|
||||
pub fn is_data_section_type(&self) -> bool {
|
||||
match self {
|
||||
Self::HeaderItem => false,
|
||||
Self::StringIdItem => false,
|
||||
Self::TypeIdItem => false,
|
||||
Self::ProtoIdItem => false,
|
||||
Self::FieldIdItem => false,
|
||||
Self::MethodIdItem => false,
|
||||
Self::ClassDefItem => false,
|
||||
Self::CallSiteIdItem => true,
|
||||
Self::MethodHandleItem => true,
|
||||
Self::MapList => true,
|
||||
Self::TypeList => true,
|
||||
Self::AnnotationSetRefList => true,
|
||||
Self::AnnotationSetItem => true,
|
||||
Self::ClassDataItem => true,
|
||||
Self::CodeItem => true,
|
||||
Self::StringDataItem => true,
|
||||
Self::DebugInfoItem => true,
|
||||
Self::AnnotationItem => true,
|
||||
Self::EncodedArrayItem => true,
|
||||
Self::AnnotationsDirectoryItem => true,
|
||||
Self::HiddenapiClassDataItem => true,
|
||||
Self::UnkownType(_) => true, // Most likely
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl MapList {
|
||||
/// The size field of a MapList.
|
||||
pub fn size_field(&self) -> u32 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue