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

项目:PDFReporter-Studio    文件:ModelUtils.java   
public static String[] getExpressionLanguages(JasperReportsConfiguration jconfig) {
    Set<String> compilers = new HashSet<String>();
    compilers.add(JRReport.LANGUAGE_JAVA);
    Map<String, String> params = jconfig.getProperties();
    for (String key : params.keySet()) {
        if (key.startsWith(JRCompiler.COMPILER_PREFIX)) {
            try {
                if (jconfig.getClassLoader() != null) {
                    Class<?> clazz = jconfig.getClassLoader().loadClass(params.get(key));
                    if (JRCompiler.class.isAssignableFrom(clazz))
                        compilers.add(key.substring(JRCompiler.COMPILER_PREFIX.length()).toLowerCase());
                }
            } catch (ClassNotFoundException e) {
            }
        }
    }
    String[] langs = new String[compilers.size() + 1];
    langs[0] = ""; //$NON-NLS-1$
    int i = 1;
    for (String lang : compilers)
        langs[i++] = lang;

    return langs;
}
项目:jasperreports    文件:JRAntCompileTask.java   
@SuppressWarnings("deprecation")
private void setCompilerClass(String compile)
{
    if (compiler != null)
    {
        jasperReportsContext.setProperty(JRCompiler.COMPILER_CLASS, compiler);
    }
}
项目:jasperreports    文件:DefaultJasperReportsContext.java   
/**
 * 
 */
@SuppressWarnings("deprecation")
protected void loadSystemProperties()
{
    loadSystemProperty("jasper.reports.compiler.class", JRCompiler.COMPILER_CLASS);
    loadSystemProperty("jasper.reports.compile.xml.validation", JRReportSaxParserFactory.COMPILER_XML_VALIDATION);
    loadSystemProperty("jasper.reports.export.xml.validation", PrintSaxParserFactory.EXPORT_XML_VALIDATION);
    loadSystemProperty("jasper.reports.compile.keep.java.file", JRCompiler.COMPILER_KEEP_JAVA_FILE);
    loadSystemProperty("jasper.reports.compile.temp", JRCompiler.COMPILER_TEMP_DIR);
    loadSystemProperty("jasper.reports.compile.class.path", JRCompiler.COMPILER_CLASSPATH); 
}
项目:jasperreports    文件:JasperCompileManager.java   
/**
 * 
 */
public JREvaluator getEvaluator(JasperReport jasperReport, JRDataset dataset) throws JRException
{
    JRCompiler compiler = getCompiler(jasperReport);
    JREvaluator evaluator = compiler.loadEvaluator(jasperReport, dataset);
    initialize(evaluator);
    return evaluator;
}
项目:jasperreports    文件:JasperCompileManager.java   
/**
 * 
 */
public JREvaluator getEvaluator(JasperReport jasperReport, JRCrosstab crosstab) throws JRException
{
    JRCompiler compiler = getCompiler(jasperReport);
    JREvaluator evaluator = compiler.loadEvaluator(jasperReport, crosstab);
    initialize(evaluator);
    return evaluator;
}
项目:jasperreports    文件:JasperCompileManager.java   
/**
 *
 */
@SuppressWarnings("deprecation")
private String getCompilerClassProperty()
{
    return JRPropertiesUtil.getInstance(jasperReportsContext).getProperty(JRCompiler.COMPILER_CLASS);
}
项目:PDFReporter-Studio    文件:JasperReportCompiler.java   
private void clean() {
    // System.out.println("------------------------------------------");
    map = new HashMap<String, JRCompiler>();
    mtype = new HashMap<String, byte[]>();
    mpack = new HashMap<String, Boolean>();
}