This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]