Skip to content

Instantly share code, notes, and snippets.

@lfryc
Created March 14, 2012 22:40
Show Gist options
  • Select an option

  • Save lfryc/2040130 to your computer and use it in GitHub Desktop.

Select an option

Save lfryc/2040130 to your computer and use it in GitHub Desktop.
// JS interface
var Graphene = function() {
};
Graphene.prototype.callSomeThing = function() {
return "0";
};
// Java interface
@JavaScript("Graphene")
@Dependency("src/main/javascript/graphene.js")
public interface JavaScriptInterface {
String callSomeThing();
}
// QUnit test
module("module name");
test("some test", function() {
});
// @QUnit annotation definition
@JavaScript(QUnitResolver.class)
public @interface QUnit () {}
// Java interface for test
@QUnit
@Dependency("src/test/qunit/test.js")
public interface QUnitTest() {
void someTest();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment