1 16 17 package de.gulden.util.javasource; 18 19 import de.gulden.util.javasource.jjt.Node; 20 import de.gulden.util.javasource.jjt.*; 21 import de.gulden.util.xml.XMLToolbox; 22 import javax.xml.parsers.*; 23 import org.w3c.dom.*; 24 import java.io.*; 25 import java.util.*; 26 27 33 public class Method extends MemberExecutable implements Typed { 34 35 39 42 protected Type type; 43 44 45 49 52 public Method(Class c) { 53 super(c); 54 } 55 56 57 61 64 public Type getType() { 65 return type; 66 } 67 68 71 public void setType(Type t) { 72 type=t; 73 } 74 75 81 public void initFromXML(Element element) throws IOException { 82 super.initFromXML(element); 84 85 Element ty=XMLToolbox.getChildRequired(element,"type"); 87 type=new Type(this); 88 type.initFromXML(ty); 89 } 90 91 97 public Element buildXML(Document d) { 98 Element e=super.buildXML(d); 99 e.insertBefore(type.buildXML(d),e.getFirstChild()); 100 return e; 101 } 102 103 108 void initFromAST(Node rootnode) { 109 super.initFromAST(rootnode); type=new Type(this); 111 type.initFromAST(rootnode); } 113 114 } | Popular Tags |