public abstract class ASTNode3 extends ASTNode { ASTNode child1; ASTNode child2; ASTNode child3; public ASTNode3(ASTNode c1, ASTNode c2, ASTNode c3) { child1 = c1; child2 = c2; child3 = c3; } public ASTNode getChild1() { return child1; } public ASTNode getChild2() { return child2; } public ASTNode getChild3() { return child3; } } public class IRProc extends ASTNode3 { public IRProc (String p, Vector v, IRCmdSeq cmds) { super(p,v,cmds); }
I extended the ASTNode as shown below, but when i try to pass in a Vector and a String as arguments I keep getting errors. How can I pass in these values without affecting the node. I was thinking of creating an intermediate class that handle the type, but i don't know how to.