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
Property that determines the maximum size of a generated Java method
|
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) |
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(StringBuilder sb)
protected final void generateDeclarations(StringBuilder sb)
protected final void generateInitParamsMethod(StringBuilder sb) throws JRException
JRExceptionprotected final void generateInitFieldsMethod(StringBuilder sb) throws JRException
JRExceptionprotected final void generateInitVarsMethod(StringBuilder sb) throws JRException
JRExceptionprotected final String generateMethod(byte evaluationType, List<JRExpression> expressionsList) throws JRException
JRExceptionprotected void writeMethodStart(StringBuilder sb, byte evaluationType, int methodIndex)
protected void writeExpression(StringBuilder sb, JRExpression expression, byte evaluationType)
protected void writeMethodEnd(StringBuilder sb, byte evaluationType, Integer nextMethodIndex)
protected void appendExpressionText(JRExpression expression, StringBuilder sb, String chunkText)
protected void appendExpressionComment(StringBuilder sb, JRExpression expression)
protected JRDefaultCompilationSourceCode parseSourceLines(String sourceCode)
protected JRExpression getLineExpression(String line)
protected JRCompilationSourceCode modifySource(Set<Method> missingMethods, String sourceCode)
protected void addMethod(StringBuilder methodBuilder, Method method)
Copyright © 2019 TIBCO Software Inc.. All rights reserved.