public class JRClassGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,JRField> |
fieldsMap |
protected Map<String,? extends JRParameter> |
parametersMap |
static String |
PROPERTY_MAX_METHOD_SIZE |
protected static String |
SOURCE_EXPRESSION_ID_END |
protected static String |
SOURCE_EXPRESSION_ID_START |
protected static int |
SOURCE_EXPRESSION_ID_START_LENGTH |
protected JRSourceCompileTask |
sourceTask |
protected JRVariable[] |
variables |
protected Map<String,JRVariable> |
variablesMap |
| Modifier | Constructor and Description |
|---|---|
protected |
JRClassGenerator(JRSourceCompileTask sourceTask) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMethod(StringBuffer methodBuffer,
Method method) |
protected void |
appendExpressionComment(StringBuffer sb,
JRExpression expression) |
protected void |
appendExpressionText(JRExpression expression,
StringBuffer sb,
String chunkText) |
protected JRCompilationSourceCode |
generateClass() |
static JRCompilationSourceCode |
generateClass(JRSourceCompileTask sourceTask)
Generates Java source code for evaluating the expressions of a report/dataset/crosstab.
|
protected void |
generateClassStart(StringBuffer sb) |
protected void |
generateDeclarations(StringBuffer sb) |
protected void |
generateInitFieldsMethod(StringBuffer sb) |
protected void |
generateInitParamsMethod(StringBuffer sb) |
protected void |
generateInitVarsMethod(StringBuffer sb) |
protected String |
generateMethod(byte evaluationType,
List<JRExpression> expressionsList) |
protected JRExpression |
getLineExpression(String line) |
static JRCompilationSourceCode |
modifySource(JRSourceCompileTask sourceTask,
Set<Method> missingMethods,
String sourceCode) |
protected JRCompilationSourceCode |
modifySource(Set<Method> missingMethods,
String sourceCode) |
protected JRDefaultCompilationSourceCode |
parseSourceLines(String sourceCode) |
protected void |
writeExpression(StringBuffer sb,
JRExpression expression,
byte evaluationType) |
protected void |
writeMethodEnd(StringBuffer sb,
byte evaluationType,
Integer nextMethodIndex) |
protected void |
writeMethodStart(StringBuffer sb,
byte evaluationType,
int methodIndex) |
public static final String PROPERTY_MAX_METHOD_SIZE
protected static final String SOURCE_EXPRESSION_ID_START
protected static final int SOURCE_EXPRESSION_ID_START_LENGTH
protected static final String SOURCE_EXPRESSION_ID_END
protected final JRSourceCompileTask sourceTask
protected Map<String,? extends JRParameter> parametersMap
protected Map<String,JRVariable> variablesMap
protected JRVariable[] variables
protected JRClassGenerator(JRSourceCompileTask sourceTask)
public static JRCompilationSourceCode generateClass(JRSourceCompileTask sourceTask) throws JRException
sourceTask - the source task containing data required to generate the source fileJRExceptionpublic static JRCompilationSourceCode modifySource(JRSourceCompileTask sourceTask, Set<Method> missingMethods, String sourceCode)
protected JRCompilationSourceCode generateClass() throws JRException
JRExceptionprotected final void generateClassStart(StringBuffer sb)
protected final void generateDeclarations(StringBuffer sb)
protected final void generateInitParamsMethod(StringBuffer sb) throws JRException
JRExceptionprotected final void generateInitFieldsMethod(StringBuffer sb) throws JRException
JRExceptionprotected final void generateInitVarsMethod(StringBuffer sb) throws JRException
JRExceptionprotected final String generateMethod(byte evaluationType, List<JRExpression> expressionsList) throws JRException
JRExceptionprotected void writeMethodStart(StringBuffer sb, byte evaluationType, int methodIndex)
protected void writeExpression(StringBuffer sb, JRExpression expression, byte evaluationType)
protected void writeMethodEnd(StringBuffer sb, byte evaluationType, Integer nextMethodIndex)
protected void appendExpressionText(JRExpression expression, StringBuffer sb, String chunkText)
protected void appendExpressionComment(StringBuffer sb, JRExpression expression)
protected JRDefaultCompilationSourceCode parseSourceLines(String sourceCode)
protected JRExpression getLineExpression(String line)
protected JRCompilationSourceCode modifySource(Set<Method> missingMethods, String sourceCode)
protected void addMethod(StringBuffer methodBuffer, Method method)
Copyright © 2014. All rights reserved.