At some point, this code should be in its own place. We can do that when someone else wants to use it. Prelimary: only tested on sun jvm (requires tools.jar) * Introduces @Example annotation. Annotate all the examples you wish to preserve with a unique tag. * The annotations are the same everywhere (in java and in the source text that gets replaced). * See src/main/resources/README.md and src/main/java/..../examples/Readme.java for an example. * CodeExtractor.java captures a map of tags->source * TagReplacer applies a CodeExtractor to a map of source->destination files. * source files have their tags replaced with methods, and are rewritten as dest files. * Generator wraps everything up into a main method. * There are some tests (only run with ant). * Modified pom to use tools.jar. src/main/resources/generate.properties is the map from source files to destination files. Only these files get processed and written. Currently the only source file is in src/main/resources/README.md (is used to generate README.md). There will be more. I couldn't figure out how to easily do this using Maven, so I wrote an ant build to do it. Ant targets are: clean - cleans up. compile - runs javac test - runs the tests run - performs the replacements!!!
…. This allows users to chain some method calls.