behaviour.srcFilename = behaviour.sourceDir + "/" + template.classname + ".java";
behaviour.setClassname(template.classname);
behaviour.setStateClass(template.classname + "State");
behaviour.setParameters(new Parameters());
AsMethod asMethod = new AsMethod();
asMethod.setComment("(factory)");
asMethod.setMethodName("as" + template.classname);
asMethod.setReturnclass(template.classname);
Statement statement = new Statement();
statement.setInnerStatement(" return new " + behaviour.classname + "(state);");
asMethod.setStatement(statement);
asMethod.setParameters(new Parameters());
behaviour.addAsMethod(asMethod);
Imports imports = new Imports();
Importstatement importstatement = new Importstatement();
String fullclassname = template.packagename + "." + template.stateClass;