The code of this project lives now in project StrategyStateGenerator.
The Strategy Generator creates Java Source Code for classes representing strategies of strategy type in a half-automated way.
The generated code provides only structures and classes. Concrete methods must be defined manually in the strategy interface and implemented in the strategy classes.
The programmer saves the time to create manually a lot of classes.
However, the methods needed can not be forseen and therefore the strategy interface and its implementations have no methods after creation. It is up to the programmer to define the necessary methods. But the time to create all classes and structures is almost null.
The Strategy Generator version 1.0.0 and later are compiled in the programming language Java in version 1.6.
The Strategy Generator version 0.1.1 and earlier are compiled in the programming language Java in version 1.8.
The Strategy Generator has the following API class:
This API class has two methods:
Some Global Properties must be set with method 'setGlobalProperties' before calling the other method.
The method 'generateConcreteStrategies' accepts an instance having type 'GenerateConcreteStrategyIn' as input parameter.
The interesting part of type GenerateConcreteStrategyIn is the property 'List<? extends Enum<?>> strategyConditionValueList'.
This list must be filled with enumeration values of an enumeration. It is assumed that each enumeration value represents
a strategy. Thus it is expected that such an enumeration exists or is created before the generator is invoked.
There are some features to mention with the Converter Generator:
Way of strategy integration
Generation of test classes
Queryable result object
Executable class with main method:
Velocity 1.7 (use velocity-1.7-dep.jar)
Apache Commons Logging 1.2
The Strategy Generator provides a design structure. There is a strategy factory interface and implementation:
The strategies themselves have an interface, an abstract class and all required strategy classes.
There exist dependencies depending on the set properties provided by the client code:
testingFramework:
integrationType:
It is possible to create strategy classes without any dependencies. To achieve this you must set the property testingFramework=NONE and integrationType=SINGLETON_BY_PATTERN.
Apache Lisense 2.0
The author cannot be made responsible for any damage caused by the Strategy Generator.
The usage of the Strategy Generator is on own risk.
The code is designed and implemented on best know-how and with good intensions by the author.
Escpecially is to mention that the generated code of the Strategy-Generator is not guaranteed to run instantly correct.
Manual supervision is necessary and crucial.
Walter Lyrer
Converter Generator
Named Parameter Converter
Strategy/State Generator
The wiki uses Markdown syntax.