Example 2

Compile all source files with names that don't end in _test.java from src and put the class files in bin.

JavaScript

// Note: The Iterators.list static method builds a List // of the elements returned from an iterator. (Java Collections API does not // seem to have any such method.) new ExtJavacTF(). addSource(src). addSourceFiles( Iterators.list( new FilteringIterator( Directories.getDepthFirstIterator(src), new EFileNameExtensionFilter("java").and( new EntityNameGlobFilter("*_test.java").not())))). setTarget(bin).run();

JRuby

# Note: The Iterators.list static method builds a List # of the elements returned from an iterator. Schmant::ExtJavacTF.new. addSource($src). addSourceFiles( Schmant::Iterators.list( Schmant::FilteringIterator.new( Schmant::Directories.getDepthFirstIterator($src), Schmant::EFileNameExtensionFilter.new("java").and( Schmant::EntityNameGlobFilter.new("*_test.java").not)))). setTarget($bin).run


* An EntityFS-aware task is implemented using EntityFS. This means that it uses the filter settings of DirectoryView:s and also that it often can work with other file system implementations than File-based, such as the RAM file system.