Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
task: redefine Parameter with generics
The Parameter class is now, ahem, parameterised with a type <T> giving the class of the values it obtains. This is generally sensible, and allows various automations based on the parameter type which were not possible before. Runtime pluggability can be much improved: string values can now as a matter of course (but optionally) be classnames of classes with the right superclass and no-arg constructors. It also allows an Environment to accept typed values as an alternative to string values. At the same time, rework the way the Parameter class was written. It was pretty nasty, making subclassing error-prone and unpleasant. Now you usually just have to implement an abstract method stringToObject. Parameter is now an abstract superclass, with StringParameter replacing it if the value you want is a String. Since the TASK API has changed, code in TTOOLS and (the moribund) NDTOOLS packages also needs to be changed. NDTOOLS builds and should be OK, but I haven't tested it. There ought not to be user-visible changes to TTOOLS, and the unit tests are fairly extensive, but quite a bit of code has changed so nasty surprises are possible. In particular null parameter values are handled slightly differently, so watch out for new NullPointerExceptions.
- Loading branch information
Showing
83 changed files
with
1,468 additions
and
1,472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.