Created
January 31, 2009 17:06
-
-
Save cv/55597 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; I'm assuming the Java namespace will have a bunch of interesting utilities for Java interop - naming might change. | |
Java method = dsyntax("", | |
[javaCode] | |
; use ASM some other bytecode writing API to create a child of JavaMethod or JavaMethod.WithNoArguments, load it and return it | |
) | |
Text lower = Java method("Returns a lower case version of this text", | |
public Object activate(IokeObject method, IokeObject context, IokeObject message, Object on) throws ControlFlow { | |
getArguments().getValidatedArgumentsAndReceiver(context, message, on, new ArrayList<Object>(), new HashMap<String, Object>()); | |
return method.runtime.newText(Text.getText(on).toLowerCase()); | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment