home | career | drupal | java | mac | mysql | perl | scala | uml | unix

Groovy example source code file (readme.txt)

This example Groovy source code file (readme.txt) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Groovy tags/keywords

an, ast, astbuilder, astbuilder, asttransformation, groovy, groovy, hello, no, the, the, to, to, transformation

The Groovy readme.txt source code

AstBuilder and AST Transformation Example

This example shows how to use the AstBuilder to add a public static void main(String[]) 
method to a class. 

The example requires ant in your path and the Groovy 1.7 (or greater) 
Jar in your classpath. 

To build the example run "ant" from the current directory. The default 
target will compile the classes needed. The last step of the build 
script prints out the command needed to run the example. 

To run the example perform either of the following from the command lines: 
  groovy MainExample.groovy
  groovyc MainExample.groovy (and then invoke with java or view with javap)
The example should print: 
  Hello from the greet() method!

No exceptions should occur. 

The MainIntegrationTest.groovy file shows how to invoke an ASTTransformation
from a unit test. An IDE should be able to debug this. 

Other Groovy examples (source code examples)

Here is a short list of links related to this Groovy readme.txt source code file:

new blog posts


Copyright 1998-2014 Alvin Alexander, alvinalexander.com
All Rights Reserved.