Java 类net.sf.jasperreports.engine.design.JRSourceCompileTask 实例源码

项目:jasperreports    文件:JRBshGenerator.java   
protected JRBshGenerator(JRSourceCompileTask sourceTask)
{
    this.sourceTask = sourceTask;

    this.parametersMap = sourceTask.getParametersMap();
    this.fieldsMap = sourceTask.getFieldsMap();
    this.variablesMap = sourceTask.getVariablesMap();
    this.variables = sourceTask.getVariables();
}
项目:jasperreports    文件:JRGroovyGenerator.java   
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);
}
项目:jasperreports    文件:JavaScriptCompilerBase.java   
@Override
protected JRCompilationSourceCode generateSourceCode(
        JRSourceCompileTask sourceTask) throws JRException
{
    //no source code
    return null;
}
项目:PDFReporter-Studio    文件:JEvalCompiler.java   
@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);
}
项目:PDFReporter-Studio    文件:JEvalExpressionEvaluator.java   
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));
    }
}
项目:PDFReporter-Studio    文件:JRJdtCompiler.java   
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);
}
项目:jasperreports-scala    文件:JRScalaGenerator.java   
protected JRScalaGenerator(JRSourceCompileTask sourceTask) {
    this.sourceTask = sourceTask;

    this.parametersMap = sourceTask.getParametersMap();
    this.fieldsMap = sourceTask.getFieldsMap();
    this.variablesMap = sourceTask.getVariablesMap();
    this.variables = sourceTask.getVariables();
}
项目:jasperreports    文件:JRBshCompiler.java   
@Override
protected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException
{
    return new JRDefaultCompilationSourceCode(JRBshGenerator.generateScript(sourceTask), null);
}
项目:jasperreports    文件:JRBshGenerator.java   
/**
 *
 */
public static String generateScript(JRSourceCompileTask sourceTask)
{
    JRBshGenerator generator = new JRBshGenerator(sourceTask);
    return generator.generateScript();
}
项目:jasperreports    文件:JRGroovyCompiler.java   
@Override
protected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException
{
    return new JRDefaultCompilationSourceCode(JRGroovyGenerator.generateClass(sourceTask), null);
}
项目:jasperreports    文件:JRGroovyGenerator.java   
/**
 *
 */
public static String generateClass(JRSourceCompileTask sourceTask) throws JRException
{
    JRGroovyGenerator generator = new JRGroovyGenerator(sourceTask);
    return generator.generateClass();
}
项目:PDFReporter-Studio    文件:JRJdtCompiler.java   
protected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException {
    return JRClassGenerator.generateClass(sourceTask);
}
项目:jasperreports-scala    文件:JRScalaCompiler.java   
/**
 * @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);
}
项目:jasperreports-scala    文件:JRScalaGenerator.java   
/**
 *
 */
public static String generateClass(JRSourceCompileTask sourceTask) throws JRException
{
    JRScalaGenerator generator = new JRScalaGenerator(sourceTask);
    return generator.generateClass();
}