net.sf.jasperreports.engine.design
Class JRClassGenerator
java.lang.Object
net.sf.jasperreports.engine.design.JRClassGenerator
public class JRClassGenerator
- extends Object
- Version:
- $Id: JRClassGenerator.java 5180 2012-03-29 13:23:12Z teodord $
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SOURCE_EXPRESSION_ID_START
protected static final String SOURCE_EXPRESSION_ID_START
- See Also:
- Constant Field Values
SOURCE_EXPRESSION_ID_START_LENGTH
protected static final int SOURCE_EXPRESSION_ID_START_LENGTH
SOURCE_EXPRESSION_ID_END
protected static final String SOURCE_EXPRESSION_ID_END
- See Also:
- Constant Field Values
sourceTask
protected final JRSourceCompileTask sourceTask
parametersMap
protected Map<String,? extends JRParameter> parametersMap
fieldsMap
protected Map<String,JRField> fieldsMap
variablesMap
protected Map<String,JRVariable> variablesMap
variables
protected JRVariable[] variables
JRClassGenerator
protected JRClassGenerator(JRSourceCompileTask sourceTask)
generateClass
public static JRCompilationSourceCode generateClass(JRSourceCompileTask sourceTask)
throws JRException
- Generates Java source code for evaluating the expressions of a report/dataset/crosstab.
- Parameters:
sourceTask - the source task containing data required to generate the source file
- Returns:
- the source code
- Throws:
JRException
generateClass
protected JRCompilationSourceCode generateClass()
throws JRException
- Throws:
JRException
generateClassStart
protected final void generateClassStart(StringBuffer sb)
generateDeclarations
protected final void generateDeclarations(StringBuffer sb)
generateInitParamsMethod
protected final void generateInitParamsMethod(StringBuffer sb)
throws JRException
- Throws:
JRException
generateInitFieldsMethod
protected final void generateInitFieldsMethod(StringBuffer sb)
throws JRException
- Throws:
JRException
generateInitVarsMethod
protected final void generateInitVarsMethod(StringBuffer sb)
throws JRException
- Throws:
JRException
generateMethod
protected final String generateMethod(byte evaluationType,
List<JRExpression> expressionsList)
throws JRException
- Throws:
JRException
appendExpressionText
protected void appendExpressionText(JRExpression expression,
StringBuffer sb,
String chunkText)
appendExpressionComment
protected void appendExpressionComment(StringBuffer sb,
JRExpression expression)
parseSourceLines
protected JRExpression[] parseSourceLines(String sourceCode)
getLineExpression
protected JRExpression getLineExpression(String line)
Copyright © 2012. All Rights Reserved.