Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CallTarget.java @ 15159:2ed720ce9273
Truffle: Change CallTarget from an abstract class to an interface. Allow varargs.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 15 Apr 2014 13:26:26 +0200 |
parents | 083e9e4df58a |
children | a47e68e146a2 |
comparison
equal
deleted
inserted
replaced
15158:083e9e4df58a | 15159:2ed720ce9273 |
---|---|
25 package com.oracle.truffle.api; | 25 package com.oracle.truffle.api; |
26 | 26 |
27 /** | 27 /** |
28 * Represents the target of a call. | 28 * Represents the target of a call. |
29 */ | 29 */ |
30 public abstract class CallTarget { | 30 public interface CallTarget { |
31 | 31 |
32 public static final Object[] NO_ARGUMENTS = new Object[0]; | 32 public static final Object[] NO_ARGUMENTS = new Object[0]; |
33 | 33 |
34 /** | 34 /** |
35 * Calls this target as a root method.. | 35 * Calls this target as a root method.. |
36 * | 36 * |
37 * @param arguments passed arguments as an object array | 37 * @param arguments passed arguments as an object array |
38 * @return the return result of the call | 38 * @return the return result of the call |
39 */ | 39 */ |
40 public abstract Object call(Object[] arguments); | 40 Object call(Object... arguments); |
41 | |
42 public final Object call() { | |
43 return call(NO_ARGUMENTS); | |
44 } | |
45 } | 41 } |