Generation is done by generateExpression.
162559
function isExpression(node) {
        switch (node.type) {
        case Syntax.AssignmentExpression:
        case Syntax.ArrayExpression:
        case Syntax.ArrayPattern:
        case Syntax.BinaryExpression:
        case Syntax.CallExpression:
        case Syntax.ConditionalExpression:
        case Syntax.ClassExpression:
        case Syntax.ExportBatchSpecifier:
        case Syntax.ExportSpecifier:
        case Syntax.FunctionExpression:
        case Syntax.Identifier:
        case Syntax.ImportDefaultSpecifier:
        case Syntax.ImportNamespaceSpecifier:
        case Syntax.ImportSpecifier:
        case Syntax.Literal:
        case Syntax.LogicalExpression:
        case Syntax.MemberExpression:
        case Syntax.MethodDefinition:
        case Syntax.ModuleSpecifier:
        case Syntax.NewExpression:
        case Syntax.ObjectExpression:
        case Syntax.ObjectPattern:
        case Syntax.Property:
        case Syntax.SequenceExpression:
        case Syntax.ThisExpression:
        case Syntax.UnaryExpression:
        case Syntax.UpdateExpression:
        case Syntax.YieldExpression:
            return true;
        }
        return false;
    }
729372
protected XExpression _generate(XPostfixOperation operation, IAppendable it, IExtraLanguageGeneratorContext context) {
		appendReturnIfExpectedReturnedExpression(it, context);
		final String operator = getOperatorSymbol(operation);
		if (operator != null) {
			it.append("("); //$NON-NLS-1$
			switch (operator) {
			case "++": //$NON-NLS-1$
				generate(operation.getOperand(), it, context);
				it.append(" += 1"); //$NON-NLS-1$
				break;
			case "--": //$NON-NLS-1$
				generate(operation.getOperand(), it, context);
				it.append(" -= 1"); //$NON-NLS-1$
				break;
			default:
				throw new IllegalArgumentException(MessageFormat.format(Messages.PyExpressionGenerator_0, operator));
			}
			it.append(")"); //$NON-NLS-1$
		}
		return operation;
	}
572841
@SuppressWarnings("static-method")
	protected XExpression _generate(XBooleanLiteral literal, IAppendable it, IExtraLanguageGeneratorContext context) {
		appendReturnIfExpectedReturnedExpression(it, context);
		it.append(literal.isIsTrue() ? "True" : "False"); //$NON-NLS-1$ //$NON-NLS-2$
		return literal;
	}
577047
@Override
    public void generate(final Module module, final Element element) {
        // this is not necessary, it is done to avoid the namespace definition
        // in every item.
        Element root = element;
        while (root.getParent() != null && root.getParent() instanceof Element) {
            root = (Element) element.getParent();
        }
        root.addNamespaceDeclaration(GeoRSSModule.SIMPLE_NS);
        root.addNamespaceDeclaration(GeoRSSModule.GML_NS);

        final Element whereElement = new Element("where", GeoRSSModule.SIMPLE_NS);
        element.addContent(whereElement);

        final GeoRSSModule geoRSSModule = (GeoRSSModule) module;
        final AbstractGeometry geometry = geoRSSModule.getGeometry();

        if (geometry instanceof Point) {
            final Position pos = ((Point) geometry).getPosition();

            final Element pointElement = new Element("Point", GeoRSSModule.GML_NS);
            whereElement.addContent(pointElement);

            final Element posElement = new Element("pos", GeoRSSModule.GML_NS);
            posElement.addContent(String.valueOf(pos.getLatitude()) + " " + String.valueOf(pos.getLongitude()));
            pointElement.addContent(posElement);
        }

        else if (geometry instanceof LineString) {
            final PositionList posList = ((LineString) geometry).getPositionList();

            final Element lineElement = new Element("LineString", GeoRSSModule.GML_NS);
            lineElement.addContent(createPosListElement(posList));
            whereElement.addContent(lineElement);
        } else if (geometry instanceof Polygon) {
            final Element polygonElement = new Element("Polygon", GeoRSSModule.GML_NS);
            {
                final AbstractRing ring = ((Polygon) geometry).getExterior();
                if (ring instanceof LinearRing) {
                    final Element exteriorElement = new Element("exterior", GeoRSSModule.GML_NS);
                    polygonElement.addContent(exteriorElement);
                    final Element ringElement = new Element("LinearRing", GeoRSSModule.GML_NS);
                    exteriorElement.addContent(ringElement);
                    ringElement.addContent(createPosListElement(((LinearRing) ring).getPositionList()));

                } else {
                    System.err.println("GeoRSS GML format can't handle rings of type: " + ring.getClass().getName());
                }
            }
            final List<AbstractRing> interiorList = ((Polygon) geometry).getInterior();
            final Iterator<AbstractRing> it = interiorList.iterator();
            while (it.hasNext()) {
                final AbstractRing ring = it.next();
                if (ring instanceof LinearRing) {
                    final Element interiorElement = new Element("interior", GeoRSSModule.GML_NS);
                    polygonElement.addContent(interiorElement);
                    final Element ringElement = new Element("LinearRing", GeoRSSModule.GML_NS);
                    interiorElement.addContent(ringElement);
                    ringElement.addContent(createPosListElement(((LinearRing) ring).getPositionList()));

                } else {
                    System.err.println("GeoRSS GML format can't handle rings of type: " + ring.getClass().getName());
                }
            }
            whereElement.addContent(polygonElement);
        } else if (geometry instanceof Envelope) {
            final Envelope envelope = (Envelope) geometry;
            final Element envelopeElement = new Element("Envelope", GeoRSSModule.GML_NS);
            whereElement.addContent(envelopeElement);

            final Element lowerElement = new Element("lowerCorner", GeoRSSModule.GML_NS);
            lowerElement.addContent(String.valueOf(envelope.getMinLatitude()) + " " + String.valueOf(envelope.getMinLongitude()));
            envelopeElement.addContent(lowerElement);

            final Element upperElement = new Element("upperCorner", GeoRSSModule.GML_NS);
            upperElement.addContent(String.valueOf(envelope.getMaxLatitude()) + " " + String.valueOf(envelope.getMaxLongitude()));
            envelopeElement.addContent(upperElement);

        } else {
            System.err.println("GeoRSS GML format can't handle geometries of type: " + geometry.getClass().getName());
        }
    }
392980
protected void generateNonExpressionIfNode(IfNode node) {
    ConditionalBuilder conditional = null;

    for (SoyNode child : node.getChildren()) {
      if (child instanceof IfCondNode) {
        IfCondNode condNode = (IfCondNode) child;

        // Convert predicate.
        Expression predicate = translateExpr(condNode.getExpr());
        // Convert body.
        Statement consequent = visitChildrenReturningCodeChunk(condNode);
        // Add if-block to conditional.
        if (conditional == null) {
          conditional = ifStatement(predicate, consequent);
        } else {
          conditional.addElseIf(predicate, consequent);
        }

      } else if (child instanceof IfElseNode) {
        // Convert body.
        Statement trailingElse = visitChildrenReturningCodeChunk((IfElseNode) child);
        // Add else-block to conditional.
        conditional.setElse(trailingElse);
      } else {
        throw new AssertionError();
      }
    }

    jsCodeBuilder.append(conditional.build());
  }
650912
private function generateMethods(): void
    {
        $this->printer->writeln('Generating methods.');
        $this->generator->setChildNamespace('Method');

        /** @var Method $method */
        foreach ($this->wsdl->getMethods() as $name => $method) {
            $this->printer->writeln(" |\-Generating method $name");
            $code = $method->visit($this->generator);
            $className = $this->findClassName($code);
            $filename = $this->destination . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php';

            $this->writer->writeFile($filename, $code);
            $this->printer->writeln("  |- Wrote $className to $filename");
        }
    }
943697
@SuppressWarnings({ "checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity" })
	protected XExpression _generate(XSwitchExpression switchStatement, IAppendable it, IExtraLanguageGeneratorContext context) {
		final String varName;
		if (switchStatement.getDeclaredParam() != null) {
			varName = it.declareUniqueNameVariable(switchStatement.getDeclaredParam(),
					switchStatement.getDeclaredParam().getSimpleName());
		} else {
			varName = it.declareSyntheticVariable(switchStatement, "___expression"); //$NON-NLS-1$
		}
		it.openPseudoScope();
		it.append(varName).append(" = "); //$NON-NLS-1$
		generate(switchStatement.getSwitch(), it, context);
		it.newLine();
		boolean first = true;
		boolean fallThrough = false;
		for (final XCasePart caseExpression : switchStatement.getCases()) {
			if (fallThrough) {
				it.append(") or ("); //$NON-NLS-1$
			} else if (first) {
				it.append("if ("); //$NON-NLS-1$
				first = false;
			} else {
				it.append("elif ("); //$NON-NLS-1$
			}
			if (caseExpression.getTypeGuard() != null) {
				it.append("isinstance(").append(varName); //$NON-NLS-1$
				it.append(", ").append(caseExpression.getTypeGuard().getType()); //$NON-NLS-1$
				it.append(")"); //$NON-NLS-1$
				if (caseExpression.getCase() != null) {
					it.append(" and ("); //$NON-NLS-1$
					generate(caseExpression.getCase(), it, context);
					it.append(")"); //$NON-NLS-1$
					final LightweightTypeReference convertedType = getExpectedType(caseExpression.getCase());
					if (!convertedType.isType(Boolean.TYPE) && !convertedType.isType(Boolean.class)) {
						it.append(" == ").append(varName); //$NON-NLS-1$
					}
				}
			} else if (caseExpression.getCase() != null) {
				it.append("("); //$NON-NLS-1$
				generate(caseExpression.getCase(), it, context);
				it.append(")"); //$NON-NLS-1$
				final LightweightTypeReference convertedType = getExpectedType(caseExpression.getCase());
				if (!convertedType.isType(Boolean.TYPE) && !convertedType.isType(Boolean.class)) {
					it.append(" == ").append(varName); //$NON-NLS-1$
				}
			}
			fallThrough = caseExpression.isFallThrough();
			if (!fallThrough) {
				it.append("):"); //$NON-NLS-1$
				it.increaseIndentation().newLine();
				if (caseExpression.getThen() != null) {
					generate(caseExpression.getThen(), it, context);
				} else {
					it.append("pass"); //$NON-NLS-1$
				}
				it.decreaseIndentation().newLine();
			}
		}
		if (switchStatement.getDefault() != null) {
			if (first) {
				generate(switchStatement.getDefault(), it, context);
				it.newLine();
			} else {
				it.append("else:"); //$NON-NLS-1$
				it.increaseIndentation().newLine();
				generate(switchStatement.getDefault(), it, context);
				it.decreaseIndentation().newLine();
			}
		}
		it.closeScope();
		return switchStatement;
	}
1219157
protected XExpression _generate(XAssignment assignment, IAppendable it, IExtraLanguageGeneratorContext context) {
		appendReturnIfExpectedReturnedExpression(it, context);
		it.append("("); //$NON-NLS-1$
		newFeatureCallGenerator(context, it).generate(assignment);
		it.append(" = "); //$NON-NLS-1$
		generate(assignment.getValue(), it, context);
		it.append(")"); //$NON-NLS-1$
		return assignment;
	}
63043
public void generate(GeneratorOutput genOut) throws CodeGenerationException
    {
        //
        // Create a new VelocityContext
        //
        VelocityContext vc = new VelocityContext();

        //
        // Transfer any code generation properties excepted by the templates into the context
        // 
        HashMap<String,Object> genContext = genOut.getContext();
        for(String key : genContext.keySet())
            vc.put(key, genContext.get(key));

        try
        {
            Writer genWriter = genOut.getWriter();
            Template template = getTemplate(genOut.getTemplateName());
            template.merge(vc, genWriter);    
            genWriter.close();
        }
        // never wrap RuntimeException
        catch (RuntimeException re) {
            throw re;
        }
        catch (Exception e) {
            throw new CodeGenerationException(e);
        }
    }
686162
void genFinalizer(Env<GenContext> env) {
        if (code.isAlive() && env.info.finalize != null)
            env.info.finalize.gen();
    }
1269968
protected XExpression _generate(AnonymousClass anonClass, IAppendable it, IExtraLanguageGeneratorContext context) {
		if (it.hasName(anonClass)) {
			appendReturnIfExpectedReturnedExpression(it, context);
			it.append(it.getName(anonClass)).append("("); //$NON-NLS-1$
			boolean firstArg = true;
			for (final XExpression arg : anonClass.getConstructorCall().getArguments()) {
				if (firstArg) {
					firstArg = false;
				} else {
					it.append(", "); //$NON-NLS-1$
				}
				generate(arg, it, context);
			}
			it.append(")"); //$NON-NLS-1$
		}
		return anonClass;
	}
104839
def generate(self):
        

        result = self._gen(self.optimized, self.splitstring)
        if self.splitstring and result is not None:
            result = result[1:]
        return result
1308271
public static void generate(Elements elementUtils, Filer filer, SQLiteDatabaseSchema schema) throws IOException {
		String className = schema.getName();

		String dataSourceName = PREFIX + className;

		className = className.replaceAll(BindDataSourceBuilder.SUFFIX, SUFFIX);
		className = PREFIX + className;

		PackageElement pkg = elementUtils.getPackageOf(schema.getElement());
		String packageName = pkg.isUnnamed() ? "" : pkg.getQualifiedName().toString();

		AnnotationProcessorUtilis.infoOnGeneratedClasses(BindDataSource.class, packageName, className);

		//@formatter:off
		builder = TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC).addModifiers(Modifier.ABSTRACT)
				.addTypeVariable(TypeVariableName.get("I"))
				.addTypeVariable(TypeVariableName.get("U"))
				.addTypeVariable(TypeVariableName.get("R"));
		//@formatter:on

		// javadoc
		builder.addJavadoc("\n<p>\nSpecialized async task to make async database operation on activity\n</p>\n");
		builder.addJavadoc("\n<p>\nUnlike standard async task, for an instance of this class can be used many time.\n</p>\n");
		builder.addJavadoc("\n<p>\nWhen method <code>execute</code> is invoked, an inner async task is created.\n</p>\n\n");
		JavadocUtility.generateJavadocGeneratedBy(builder);
		builder.addJavadoc("@param I input param\n");
		builder.addJavadoc("@param U update param\n");
		builder.addJavadoc("@param R result param\n\n");
		builder.addJavadoc("@see $T\n", className(className.replaceAll(SUFFIX, BindDaoFactoryBuilder.SUFFIX)));
		builder.addJavadoc("@see $T\n", className(dataSourceName));
		builder.addJavadoc("@see $T\n", BindAsyncTaskType.class);

		// build constructors
		builder.addMethod(MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC).addStatement("this($T.READ)", BindAsyncTaskType.class)
				.addJavadoc("<p>\nWith this constructor, a read only database connection will be used\n</p>\n").build());

		builder.addMethod(
				MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC).addJavadoc("<p>\nWith this constructor it is possible to specify which type of database use in async task\n</p>\n\n")
						.addJavadoc("@param mode allows to specify if and how open a data source connection\n").addParameter(BindAsyncTaskType.class, "mode").addCode("this.mode = mode;").build());

		// define fields
		{
			FieldSpec.Builder fieldSpec = FieldSpec.builder(BindAsyncTaskType.class, "mode", Modifier.PROTECTED);
			fieldSpec.addJavadoc("Allows to specify how async task interacts with data source.\n\n");
			builder.addField(fieldSpec.build());
		}

		{
			ParameterizedTypeName parameterizedTypeName = ParameterizedTypeName.get(TypeUtility.className(AsyncTask.class), TypeUtility.typeName("I"), TypeUtility.typeName("U"),
					TypeUtility.typeName("R"));
			FieldSpec.Builder fieldSpec = FieldSpec.builder(parameterizedTypeName, "asyncTask", Modifier.PROTECTED);
			fieldSpec.addJavadoc("Async task wrapped by this class\n\n");
			builder.addField(fieldSpec.build());
		}

		// build methods
		builder.addMethod(MethodSpec.methodBuilder("onPreExecute").addModifiers(Modifier.PUBLIC).addJavadoc("Use this method for operations on UI-thread before start execution\n").build());

		builder.addMethod(MethodSpec.methodBuilder("onExecute").returns(TypeUtility.typeName("R")).addParameter(TypeUtility.typeName(dataSourceName), "dataSource")
				.addJavadoc(
						"Method used to encapsulate operations on datasource\n\n@param dataSource\n\tuse it to retrieve DAO\n@return\n\tresult of operation (list, bean, etc) and execute transactions.\n")
				.addModifiers(Modifier.PUBLIC).addModifiers(Modifier.ABSTRACT).addException(Throwable.class).build());
		builder.addMethod(MethodSpec.methodBuilder("onFinish").addParameter(TypeUtility.typeName("R"), "result").addModifiers(Modifier.PUBLIC).addModifiers(Modifier.ABSTRACT)
				.addJavadoc("Use this method for operations on UI-thread after execution\n").build());

		builder.addMethod(MethodSpec.methodBuilder("onProgressUpdate").addModifiers(Modifier.PUBLIC).addParameter(ParameterSpec.builder(ArrayTypeName.of(TypeUtility.typeName("U")), "update").addAnnotation(AnnotationSpec.builder(SuppressWarnings.class).addMember("value", "$S", "unchecked").build()).build())
				.varargs().addJavadoc("Override this method to KRIPTON_DEBUG operation progress on UI-Thread\n").build());

		builder.addMethod(MethodSpec.methodBuilder("onError").addParameter(Throwable.class, "exception").addModifiers(Modifier.PUBLIC)
				.addJavadoc("This method is invoked when <code>onExecute</code> method generate an exception.\n@param exception exception generated\n")
				.addStatement("$T.error(exception.getMessage())", Logger.class).addStatement("exception.printStackTrace()").build());

		// method execute1
		{
			MethodSpec.Builder executeBuilder = MethodSpec.methodBuilder("execute")
					.addParameter(ParameterSpec.builder(ArrayTypeName.of(TypeUtility.className("I")), "params")
							.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class).addMember("value", "$S", "unchecked").build()).build())
					.varargs(true).addModifiers(Modifier.PUBLIC).addJavadoc("Method to start operations.\n\n@param executor used executor\n@param data input\n");

			executeBuilder.addStatement("executeOnExecutor($T.SERIAL_EXECUTOR, params)", android.os.AsyncTask.class);
			builder.addMethod(executeBuilder.build());
		}

		// method execute2
		{
			MethodSpec.Builder executeBuilder = MethodSpec.methodBuilder("executeOnExecutor").addParameter(Executor.class, "executor")
					.addParameter(ParameterSpec.builder(ArrayTypeName.of(TypeUtility.className("I")), "params")
							.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class).addMember("value", "$S", "unchecked").build()).build())
					.varargs(true).addModifiers(Modifier.PUBLIC).addJavadoc("Method to start operations.\n\n@param executor used executor\n@param data input\n");

		//@formatter:off
		TypeSpec.Builder anonymous = TypeSpec.anonymousClassBuilder("")
				.addSuperinterface(ParameterizedTypeName.get(TypeUtility.className(AsyncTask.class), TypeUtility.className("I"), TypeUtility.className("U"), TypeUtility.className("R")));
		anonymous.addMethod(MethodSpec.methodBuilder("onPreExecute").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).addStatement("$L.this.onPreExecute()",className).build());
		
		anonymous.addMethod(MethodSpec.methodBuilder("doInBackground").addModifiers(Modifier.PUBLIC).returns(TypeUtility.typeName("R")).addAnnotation(Override.class)
				.addParameter(ParameterSpec.builder(ArrayTypeName.of(TypeUtility.className("I")), "params")
						.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class).addMember("value","$S", "unchecked").build())
						.build()).varargs(true)
				.addStatement("$L dataSource=$L.getInstance()", dataSourceName, dataSourceName)
				.addStatement("R result=null")
				.addStatement("boolean needToOpened=false")
				.addCode("if (mode==$T.READ) { needToOpened=true; dataSource.openReadOnlyDatabase(); } else if (mode==$T.READ_WRITE) { needToOpened=true; dataSource.openWritableDatabase();}\n", BindAsyncTaskType.class,BindAsyncTaskType.class)
				//.addStatement("$T sqlite=readOnlyTask ? dataSource.getReadableDatabase() : dataSource.getWritableDatabase()", SQLiteDatabase.class)
				.beginControlFlow("try")
				.addStatement("result=onExecute(dataSource)")
				.nextControlFlow("catch(Throwable e)")
					.addStatement("onError(e)")
				.nextControlFlow("finally")
					.beginControlFlow("if (needToOpened)")
					.addStatement("dataSource.close()")
					.endControlFlow()
				.endControlFlow()
				.addStatement("return result").build());
		
		anonymous.addMethod(MethodSpec.methodBuilder("onProgressUpdate")
				.addModifiers(Modifier.PUBLIC)
				.addAnnotation(Override.class)
				.addParameter(ParameterSpec.builder(ArrayTypeName.of(TypeUtility.className("U"))
						, "values")
						.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class).addMember("value","$S", "unchecked").build())
						.build())
				.varargs(true)
				.addStatement("$L.this.onProgressUpdate(values)", className)
				.build());
		
		anonymous.addMethod(MethodSpec.methodBuilder("onPostExecute")
				.addModifiers(Modifier.PUBLIC)
				.addAnnotation(Override.class)
				.addParameter(ParameterSpec.builder(TypeUtility.className("R"), "result").build())
				.addStatement("$L.this.onFinish(result)",className)
				.build());
		//@formatter:on

		//@formatter:off
		executeBuilder.addStatement("asyncTask=$L", anonymous.build());		
		executeBuilder.addStatement("asyncTask.executeOnExecutor(executor, params)", anonymous.build());
		builder.addMethod(executeBuilder.build());		
					
		anonymous.addMethod(MethodSpec.methodBuilder("cancel")
				.addModifiers(Modifier.PUBLIC)
				.addModifiers(Modifier.FINAL)
				.addParameter(Boolean.TYPE, "mayInterruptIfRunning")
				.beginControlFlow("if (asyncTask!=null, args)")
				.addStatement("return asyncTask.cancel(mayInterruptIfRunning)")
				.endControlFlow()
				.addStatement("return false").build());
		}

		
		// build SimpleAsyncTask
		builder.addType(TypeSpec.classBuilder("Simple")
				.addJavadoc("Simple implementation of async task. It uses read only database.\n\n")
				.addJavadoc("@see $T\n", TypeUtility.typeName(className.replaceAll(SUFFIX, BindDaoFactoryBuilder.SUFFIX)))
				.addJavadoc("@see $T\n", TypeUtility.typeName(dataSourceName))
				.addModifiers(Modifier.PUBLIC)
				.addModifiers(Modifier.STATIC)
				.addModifiers(Modifier.ABSTRACT)
				.addTypeVariable(TypeVariableName.get("R"))
				.superclass(
						ParameterizedTypeName.get(TypeUtility.className(className),
								TypeUtility.className("Void"), 
								TypeUtility.className("Void"), 
								TypeUtility.className("R")
								)							
				)				
				.addMethod(MethodSpec.constructorBuilder()
						.addModifiers(Modifier.PUBLIC)
						.addJavadoc("Create an simple async task allowing user to decide which kind of operation can be done on datasource")
						.addParameter(BindAsyncTaskType.class, "mode")
						.addStatement("super(mode)").build())
				.addMethod(MethodSpec.constructorBuilder()
						.addModifiers(Modifier.PUBLIC)
						.addJavadoc("Create an simple async task for data source read only operation")
						.addStatement("super($T.READ)", BindAsyncTaskType.class).build())
				.build());		
		//@formatter:on

		TypeSpec typeSpec = builder.build();
		JavaWriterHelper.writeJava2File(filer, packageName, typeSpec);		
	}
627624
void process() {
        fixImports();
        if (insertRegion != null) {
            data.ensureImport(BeanDefinition.class);
            if (properties.size() > 0) {
                data.ensureImport(PropertyDefinition.class);
            }
            removeOld();
            if (data.isRootClass() && data.isExtendsDirectBean()) {
                data.ensureImport(DirectBean.class);
            }
            generateMeta();
            generateSerializationVersionId();
            generatePropertyChangeSupportField();
            generateHashCodeField();
            generateFactory();
            generateImmutableBuilderMethod();
            generateArgBasedConstructor();
            generateBuilderBasedConstructor();
            generateMetaBean();
            generateGettersSetters();
            generateSeparator();
            generateImmutableToBuilder();
            generateClone();
            generateEquals();
            generateHashCode();
            generateToString();
            generateMetaClass();
            generateBuilderClass();
            resolveImports();
            resolveIndents();
        }
    }
383117
protected XExpression _generate(XIfExpression ifStatement, IAppendable it, IExtraLanguageGeneratorContext context) {
		it.append("if "); //$NON-NLS-1$
		generate(ifStatement.getIf(), it, context);
		it.append(":"); //$NON-NLS-1$
		it.increaseIndentation().newLine();
		if (ifStatement.getThen() != null) {
			generate(ifStatement.getThen(), context.getExpectedExpressionType(), it, context);
		} else if (context.getExpectedExpressionType() == null) {
			it.append("pass"); //$NON-NLS-1$
		} else {
			it.append("return ").append(toDefaultValue(context.getExpectedExpressionType().toJavaCompliantTypeReference())); //$NON-NLS-1$
		}
		it.decreaseIndentation();
		if (ifStatement.getElse() != null) {
			it.newLine().append("else:"); //$NON-NLS-1$
			it.increaseIndentation().newLine();
			generate(ifStatement.getElse(), context.getExpectedExpressionType(), it, context);
			it.decreaseIndentation();
		} else if (context.getExpectedExpressionType() != null) {
			it.newLine().append("else:"); //$NON-NLS-1$
			it.increaseIndentation().newLine();
			it.append("return ").append(toDefaultValue(context.getExpectedExpressionType().toJavaCompliantTypeReference())); //$NON-NLS-1$
			it.decreaseIndentation();
		}
		return ifStatement;
	}
1303614
protected XExpression _generate(SarlAssertExpression assertStatement, IAppendable it, IExtraLanguageGeneratorContext context) {
		final boolean haveAssert = !assertStatement.isIsStatic() && assertStatement.getCondition() != null;
		if (haveAssert) {
			it.append("assert (lambda:"); //$NON-NLS-1$
			it.increaseIndentation().newLine();
			generate(assertStatement.getCondition(), it, context);
			it.decreaseIndentation().newLine();
			it.append(")()"); //$NON-NLS-1$
		}
		if (context.getExpectedExpressionType() != null) {
			if (haveAssert) {
				it.newLine();
			}
			it.append("return ").append(toDefaultValue(context.getExpectedExpressionType().toJavaCompliantTypeReference())); //$NON-NLS-1$
		}
		return assertStatement;
	}
1188921
@Override
	public Collection<BioPAXElement> generate(Match match, int... ind)
	{
		Collection<BioPAXElement> gen = new HashSet<BioPAXElement>();

		for (MappedConst mc : con)
		{
			gen.addAll(mc.generate(match, ind));
		}
		return gen;
	}