protected JRBshGenerator(JRSourceCompileTask sourceTask) { this.sourceTask = sourceTask; this.parametersMap = sourceTask.getParametersMap(); this.fieldsMap = sourceTask.getFieldsMap(); this.variablesMap = sourceTask.getVariablesMap(); this.variables = sourceTask.getVariables(); }
protected JRGroovyGenerator(JRSourceCompileTask sourceTask) { this.sourceTask = sourceTask; this.parametersMap = sourceTask.getParametersMap(); this.fieldsMap = sourceTask.getFieldsMap(); this.variablesMap = sourceTask.getVariablesMap(); this.variables = sourceTask.getVariables(); JRPropertiesUtil properties = JRPropertiesUtil.getInstance(sourceTask.getJasperReportsContext()); maxMethodSize = properties.getIntegerProperty(PROPERTY_MAX_METHOD_SIZE, Integer.MAX_VALUE); }
@Override protected JRCompilationSourceCode generateSourceCode( JRSourceCompileTask sourceTask) throws JRException { //no source code return null; }
@Override protected JRCompilationSourceCode generateSourceCode( JRSourceCompileTask sourceTask) throws JRException { // TODO (12.04.2013, Donat, Open Software Solutions): Create a evaluator instance per call and serialize it JEvalExpressionEvaluator evaluator = new JEvalExpressionEvaluator(); evaluator.initializeWithDefaults(sourceTask); evaluator.parseExpressions(sourceTask); evaluators.put(sourceTask.getUnitName(), evaluator); return new JRDefaultCompilationSourceCode(sourceTask.getUnitName(),null); }
public void parseExpressions(JRSourceCompileTask sourceTask) throws JRException { m_expressions.clear(); List<JRExpression> expressions = sourceTask.getExpressions(); for (JRExpression expression : expressions) { Integer id = sourceTask.getExpressionId(expression); m_expressions.put(id, buildExpression(expression,id)); } }
protected JRCompilationUnit recreateCompileUnit(JRCompilationUnit compilationUnit, Set<Method> missingMethods) { String unitName = compilationUnit.getName(); JRSourceCompileTask sourceTask = compilationUnit.getCompileTask(); JRCompilationSourceCode sourceCode = JRClassGenerator.modifySource(sourceTask, missingMethods, compilationUnit.getSourceCode()); File sourceFile = compilationUnit.getSourceFile(); File saveSourceDir = sourceFile == null ? null : sourceFile.getParentFile(); sourceFile = getSourceFile(saveSourceDir, unitName, sourceCode); return new JRCompilationUnit(unitName, sourceCode, sourceFile, compilationUnit.getExpressions(), sourceTask); }
protected JRScalaGenerator(JRSourceCompileTask sourceTask) { this.sourceTask = sourceTask; this.parametersMap = sourceTask.getParametersMap(); this.fieldsMap = sourceTask.getFieldsMap(); this.variablesMap = sourceTask.getVariablesMap(); this.variables = sourceTask.getVariables(); }
@Override protected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException { return new JRDefaultCompilationSourceCode(JRBshGenerator.generateScript(sourceTask), null); }
/** * */ public static String generateScript(JRSourceCompileTask sourceTask) { JRBshGenerator generator = new JRBshGenerator(sourceTask); return generator.generateScript(); }
@Override protected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException { return new JRDefaultCompilationSourceCode(JRGroovyGenerator.generateClass(sourceTask), null); }
/** * */ public static String generateClass(JRSourceCompileTask sourceTask) throws JRException { JRGroovyGenerator generator = new JRGroovyGenerator(sourceTask); return generator.generateClass(); }
protected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException { return JRClassGenerator.generateClass(sourceTask); }
/** * @see net.sf.jasperreports.engine.design.JRAbstractCompiler#generateSourceCode(net.sf.jasperreports.engine.design.JRSourceCompileTask) */ @Override protected JRCompilationSourceCode generateSourceCode( JRSourceCompileTask sourceTask) throws JRException { return new JRDefaultCompilationSourceCode(JRScalaGenerator.generateClass(sourceTask), null); }
/** * */ public static String generateClass(JRSourceCompileTask sourceTask) throws JRException { JRScalaGenerator generator = new JRScalaGenerator(sourceTask); return generator.generateClass(); }