A Custom DataType for ClassToSource

As we’ve just witnessed, the Path and FileSet DataTypes offer a tremendous amount of flexibility. So much flexibility, in fact, that they become difficult to use and debug. Using these DataTypes, users can specify things that can inhibit ClassToSource’s ability to deal with the information provided. It would be better if we had a DataType that was a little more restrictive.

One way to think of a class or source path is to view it as a set of directories. Let’s introduce a class called DirectorySet and state some requirements for it. The DirectorySet class should

  • Accept a set of directories that contain Java packages holding either source or class files

  • Provide a listing of all source of the class files found ...

Get Ant Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.