1use std::range::Range;
4
5#[derive(Debug, Clone, PartialEq)]
7pub struct JavaRoot {
8 pub items: Vec<Item>,
10}
11
12#[derive(Debug, Clone, PartialEq)]
14pub enum Item {
15 Class(ClassDeclaration),
17 Interface(InterfaceDeclaration),
19 Package(PackageDeclaration),
21 Import(ImportDeclaration),
23}
24
25#[derive(Debug, Clone, PartialEq)]
27pub struct ClassDeclaration {
28 pub name: String,
30 pub span: Range<usize>,
32}
33
34#[derive(Debug, Clone, PartialEq)]
36pub struct InterfaceDeclaration {
37 pub name: String,
39 pub span: Range<usize>,
41}
42
43#[derive(Debug, Clone, PartialEq)]
45pub struct PackageDeclaration {
46 pub name: String,
48 pub span: Range<usize>,
50}
51
52#[derive(Debug, Clone, PartialEq)]
54pub struct ImportDeclaration {
55 pub path: String,
57 pub is_static: bool,
59 pub span: Range<usize>,
61}