1 33 34 35 package bsh; 36 37 class BSHReturnType extends SimpleNode 38 { 39 public boolean isVoid; 40 41 BSHReturnType(int id) { super(id); } 42 43 BSHType getTypeNode() { 44 return (BSHType)jjtGetChild(0); 45 } 46 47 public String getTypeDescriptor( 48 CallStack callstack, Interpreter interpreter, String defaultPackage ) 49 { 50 if ( isVoid ) 51 return "V"; 52 else 53 return getTypeNode().getTypeDescriptor( 54 callstack, interpreter, defaultPackage ); 55 } 56 57 public Class evalReturnType( 58 CallStack callstack, Interpreter interpreter ) throws EvalError 59 { 60 if ( isVoid ) 61 return Void.TYPE; 62 else 63 return getTypeNode().getType( callstack, interpreter ); 64 } 65 } 66 67 | Popular Tags |