2009/5/6 John Cowan <[email protected]>:
>
> In my language, I need objects which represent Java static methods.
How about:
public abstract class Function3 {
public static final Function3 foo = new Function3() {
public Object invoke(Object arg1, Object arg2, Object arg3) {
return foo(arg1, arg2, arg3);
}
};
public static final Function3 bar = new Function3() {
public Object invoke(Object arg1, Object arg2, Object arg3) {
return bar(arg1, arg2, arg3);
}
};
public static final Function3 baz = new Function3() {
public Object invoke(Object arg1, Object arg2, Object arg3) {
return baz(arg1, arg2, arg3);
}
};
private static Object foo(Object arg1, Object arg2, Object arg3) = { ... }
private static Object bar(Object arg1, Object arg2, Object arg3) = { ... }
private static Object baz(arg1, arg2, arg3) = { ... }
public abstract Object invoke(Object arg1, Object arg2, Object arg3);
}
John Wilson
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---