@flags

Set
jGazm flags directly in the code.

@flags -clean -check -showcp ...

Flags set in this operation will override flags given on the command line.
-stdin, -version, -showapi, -java and -help does nothing here.


@import

Same as Java import

@import com.crazedout.jgazm.*;

Default imports are:

com.crazedout.jgazm.*;
java.util.*;
java.io.*;
java.net.*
static java.util.Arrays.*;
Use -noimport to turn this off.

@classpath

Include classpath directly in the code:

@classpath "c:/path/to/mylib.jar;c:/temp/myjar.jar"
If classpath is not absolute the jgazm.home path will we used as base directory.


@include

Include other jGazm source.

@include "c:/path/to/myscript.jgazm"
If included file path is not absolute the jgazm.home path will we used as base directory.


@global

Sets a variable or object as global in the source.

@global String title = "My App Title";
or
@global {
  String[] myNames = {"John",
  "Paul",
  "George",
  "Ringo"};
 }


@class

Annotates a inner class.

	@class
	public class MyClass(){
		public MyClass(){
		}
		public String getName(){
			return this.class.toString();
		}
	}
	

@method

Annotates a method.

	@method
	public String getHello(){
		return "HelloWorld";
	}
	

@catch

Encapsulates given code in an try/catch onException statement.

@catch{
	Integer.parseInt("Ringo");
}
equivs to:
try{
	Integer.parseInt("Ringo");
}catch(Exception ex){
	onException(ex);
}
Mostly used inside methods otherwise not worth while...

@thread

Executes code inside a Thread.Runnable().run() method.

	@thread {
		String html = sendGet("http://www.google.com");
		out(html);
	}
	

@string

Compiles the text inside this annotation as a Java String.
Java code within $ will be executed as Java and inserted into the string.
@ sign inside a @string statement must be escaped as \@.
	@string(name="myString") {
		Hello. This is a message from jGazm string util.
		The directory of this runnable is $System.getProperty("user.dir")$.
		The End.
	}
	alert(myString);
	

@exception

Overrides the Lang.onException(Exception) which is called when an Exception is raised in the main code of jGazm.
     @exception {
        alert("An Exception of type " + ex.getClass() + " was thrown...");
	 }
    
This can also be handled like this:
        @method
        public void onException(Excepetion ex){
            alert("An Exception of type " + ex.getClass() + " was thrown...");
        }