Description Declarations of instance variables, methods, and other class-level declarations are used to provide control over the class. The example shows a declaration of an instance variable count and a method called transform. The combination translates every odd numbered word to upper case.
Simple Form
#declarations java-declarations #
XML Form
<declarations> java-declarations </declarations>
Translation to Java
java-declarations (inserted at the class level,
	rather than the generate method)
Example Template Dict.template


int count = 0;

void transform(String s, ProgramWriter out) {
	if (count%2==0) {
	} else {


public class test {

	String[] words = {
	#for "//word"#
		"# transform(context.evalString("."), out); #",

Example Spec words.xml

<?xml version="1.0"?>
Generated Output

public class test {

	String[] words = {