01: /*
02: * xtc - The eXTensible Compiler
03: * Copyright (C) 2004-2007 New York University
04: *
05: * This program is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU General Public License
07: * version 2 as published by the Free Software Foundation.
08: *
09: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13: *
14: * You should have received a copy of the GNU General Public License
15: * along with this program; if not, write to the Free Software
16: * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17: * USA.
18: */
19:
20: package xtc.xform;
21:
22: import java.util.List;
23:
24: /**
25: * The interface for external functions.
26: *
27: * @author Joe Pamer
28: * @version $Revision: 1.12 $
29: */
30: public interface Function {
31:
32: /**
33: * Get the name of the function.
34: *
35: * @return The name.
36: */
37: String getName();
38:
39: /**
40: * Apply the function on the specified arguments.
41: *
42: * @param arguments The arguments.
43: * @return The result.
44: * @throws IllegalArgumentException Signals that the arguments are
45: * malformed.
46: */
47:
48: Object apply(List<Object> arguments)
49: throws IllegalArgumentException;
50: }
|