Changes
This commit is contained in:
parent
0bf0038112
commit
b6607efec8
@ -1,4 +1,16 @@
|
||||
package com.openeggbert.next.ast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Class {
|
||||
|
||||
private String name;
|
||||
private Access access;
|
||||
|
||||
private String packageName;
|
||||
private List<String> imports = new ArrayList<>();
|
||||
private List<Field> fields = new ArrayList<>();
|
||||
private List<Constructor> constructors = new ArrayList<>();
|
||||
private List<Method> methods = new ArrayList<>();
|
||||
}
|
||||
|
10
src/main/java/com/openeggbert/next/ast/Constructor.java
Normal file
10
src/main/java/com/openeggbert/next/ast/Constructor.java
Normal file
@ -0,0 +1,10 @@
|
||||
package com.openeggbert.next.ast;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class Constructor extends Method{
|
||||
}
|
14
src/main/java/com/openeggbert/next/ast/Field.java
Normal file
14
src/main/java/com/openeggbert/next/ast/Field.java
Normal file
@ -0,0 +1,14 @@
|
||||
package com.openeggbert.next.ast;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class Field {
|
||||
private String name;
|
||||
private String type;
|
||||
private Access access;
|
||||
private String initialValue;
|
||||
}
|
16
src/main/java/com/openeggbert/next/ast/Method.java
Normal file
16
src/main/java/com/openeggbert/next/ast/Method.java
Normal file
@ -0,0 +1,16 @@
|
||||
package com.openeggbert.next.ast;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class Method {
|
||||
private String name;
|
||||
private String returnType;
|
||||
private Access access;
|
||||
private boolean staticMethod;
|
||||
private List<MethodParameter> parameters = new ArrayList<>();
|
||||
private Body body;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.openeggbert.next.ast;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MethodParameter {
|
||||
private String name;
|
||||
private String type;
|
||||
}
|
Reference in New Issue
Block a user