Function extends Element implements TypedElement { public final Type getType() { return this.args[this.args.length - 1]; } Function(final String id, final Type... args); final String getId(); final OperationSequence getBody(); final boolean validateInput(final Variable ... input); final Variable[] getVariables(); final Type[] getArgTypes(); final Type getType(); @Override final String toString();  }
@Test public void testGetType() throws Exception { Function f = new Function("f", Type.INT, Type.BOOL, Type.CHAR); assertEquals(Type.CHAR, f.getType()); }