Value object generator (vo)

The general focus of this generator is to modify a given value object to a rich object which contains to each attribute getter and setter methods. The methods hashCode, equals and toString are also well creates. The input for the generator is a Java class which contains at least some attributes.

The next simple example shows the mechanism:

Input file:

class TestVoFile
{
	String myString;
	int member;
	double value;
}

The generator will create the following file (depending on the configuration):



Using value object generator

To use te processor generator you can use the script file vogenerator.bat or vogenerator.sh. You have probably some hands on the files to work with your environment.

The usage is the following:

Usage:  jptools.pattern.vo.generator.ValueObjectGenerator [OPTIONS]
OPTIONS:
  -o [path]                       Sets the output path
  -i [path or file]               Sets the input file (directory or a file)

OPTIONAL OPTIONS:
  -c [configuration.properties]   Reads the generator and formatter base configuration. This file defines the global settings.
  -pc [configuration.properties]  Reads the additional or project specific generator and formatter configuration.
  -verbose                        Sets on the verbose mode

The input definition defines either one or multiple files or a directory followed by the names of the files in the directory to consider.


Configuration

The generator can be configured over a properties file. Additional the javadoc will be used to define some special behavior. The description of the configuration is here available.