diff options
Diffstat (limited to 'st/MethodInstance.java')
-rw-r--r-- | st/MethodInstance.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/st/MethodInstance.java b/st/MethodInstance.java new file mode 100644 index 0000000..c0082af --- /dev/null +++ b/st/MethodInstance.java @@ -0,0 +1,24 @@ +package st; + +import java.util.ArrayList; + +public class MethodInstance extends AbstractInstance { + private ArrayList<TypeEnum> args; // the list of arguments + private TypeEnum rtrn; // the returned type + + public MethodInstance(String name, TypeEnum rtrn) { + super(name, TypeEnum.method); + this.args = new ArrayList<>(); + this.rtrn = rtrn; + } + + public String toString() { + return name + ":" + type + "[" + + this.rtrn + "]"; + } + + public void add_argument(TypeEnum arg) { + this.args.add(arg); + } + +} |