This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Java Annotations?
- From: Jamison Hope <jrh at theptrgroup dot com>
- To: kawa at sourceware dot org
- Date: Tue, 8 Dec 2009 16:00:17 -0500
- Subject: Java Annotations?
Is there (or are there any plans for) a facility to annotate functions
or methods in Scheme using Java 5 annotations? It would be handy to be
able to write (among other things) JUnit4 tests in Scheme.
For example, for the Enumeration->list function I mentioned in my last
thread, I currently have a JUnit test which looks like
@Test public void checkEnumerationToList() {
Vector<String> v = new Vector<String>();
LList l = LList.makeList( new Object[]{"This", "is", "a",
"test."}, 0 );
v.addAll( l );
LList enumList = collections_utils.Enumeration$To
$List( v.elements() );
assertEquals( l, enumList );
}
That isn't too bad, but it isn't nearly as natural as it would be to
write the test in Scheme (either as a module with annotated functions,
or as a simple class with annotated methods).
Thanks,
Jamie
--
Jamison Hope
The PTR Group
www.theptrgroup.com