CyLog Software Homepage BeanMaker v2.10
Copyright 2000-2006 CyLog Software
Introduction
Quick Guide
How the engine works
Writing Templates
Tutorials
   1. Simple Java Class
   
Registration
License Agreement

Tutorial 1 - Generate a simple Java Class

For the first tutorial, let's ignore BeanMaker's configuration and focus on using some simple tags and a template.

1.1 Prepare the Template
Copy and paste the following template into BeanMaker's template editor:

package $package$;

import java.io.*;

/**
 * My first java class using BeanMaker
 * @author $author$
 * @version $version$
 */
public static $class$
{
    public static void main ( String[] args )
    {
        System.out.println ("Hello World!");
    }
}

1.2 Set the Bean Properties
Go to the "Bean Properties" tab and enter the following into the form:

Bean Typeselect "Use Template Editor..." from the drop-down list.
Packagecom.hello.applications
ClassHelloWorld
AuthorMy Name
Version1.0

1.3 The Result
Click the Generate Bean button on the "Bean Properties" tab or click [F2]. This is the resulting code. Note the items in bold that have been replaced by the template engine.

package com.hello.applications;

import java.io.*;

/**
 * My first java class using BeanMaker
 * @author My Name
 * @version 1.0
 */
public static HelloWorld
{
    public static void main ( String[] args )
    {
        System.out.println ("Hello World!");
    }
}    

You can find the examples under:
{BeanMaker home}\samples\tutorial\templates\hello_world.java.tpl

Copyright 2000-2006 CyLog Software    www.cylog.org