An Implementation for ClassToSource

From UA1, we know that the user must supply both a source path and a class path. Each of these paths may be a composite of several path elements. These path elements are used to search for either class or source files. This description provides a compelling enough reason to justify representing each with its own separate class. Let’s introduce the SourcePathElement and ClassPathElement classes.

A SourcePathElement is a single component in the source path. You can query it for all its source files. After it’s created, a SourcePathElement should exist and be immutable. The same requirements are true for a ClassPathElement.

We’ll construct two test projects: The first contains class files with matching source, ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.