28 lines
707 B
Java
28 lines
707 B
Java
package be.jeffcheasey88.peeratcode.parser.java;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import be.jeffcheasey88.peeratcode.parser.Bag;
|
|
import be.jeffcheasey88.peeratcode.parser.Token;
|
|
|
|
public class Function extends JavaElement{
|
|
|
|
private List<Annotation> annotations;
|
|
|
|
private String returnType;
|
|
private String name;
|
|
|
|
private List<JavaElement> elements;
|
|
|
|
public Function(Bag bag){
|
|
System.out.println(bag);
|
|
this.returnType = bag.<Bag>get("return").<Token>get().getValue();
|
|
if(JavaParser.getModifier(this.returnType) > 0) this.returnType = null;
|
|
this.name = bag.<Token>get("name").getValue();
|
|
|
|
this.annotations = new ArrayList<>();
|
|
this.elements = new ArrayList<>();
|
|
}
|
|
|
|
}
|