mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
refactor StaticInitializer into it's own class
This commit is contained in:
@@ -4,18 +4,18 @@ import java.util.List;
|
||||
|
||||
/** The body of a {@linkplain ClassDeclaration} or {@linkplain ClassExpression}. */
|
||||
public class ClassBody extends Node {
|
||||
private final List<Node> body; // either MemberDefinition or BlockStatement (static initialization blocks)
|
||||
private final List<MemberDefinition<?>> body;
|
||||
|
||||
public ClassBody(SourceLocation loc, List<Node> body) {
|
||||
public ClassBody(SourceLocation loc, List<MemberDefinition<?>> body) {
|
||||
super("ClassBody", loc);
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
public List<Node> getBody() {
|
||||
public List<MemberDefinition<?>> getBody() {
|
||||
return body;
|
||||
}
|
||||
|
||||
public void addMember(Node md) {
|
||||
public void addMember(MemberDefinition<?> md) {
|
||||
body.add(md);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user