Package net.sf.jasperreports.groovy
Class JRGroovyGenerator
- java.lang.Object
-
- net.sf.jasperreports.groovy.JRGroovyGenerator
-
public class JRGroovyGenerator extends Object
- Author:
- Teodor Danciu (teodord@users.sourceforge.net), Peter Severin (peter_p_s@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field 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 groovy methodprotected JRSourceCompileTask
sourceTask
protected JRVariable[]
variables
protected Map<String,JRVariable>
variablesMap
-
Constructor Summary
Constructors Modifier Constructor Description protected
JRGroovyGenerator(JRSourceCompileTask sourceTask, ReportClassFilter classFilter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
generateClass()
static String
generateClass(JRSourceCompileTask sourceTask)
static String
generateClass(JRSourceCompileTask sourceTask, ReportClassFilter classFilter)
protected void
generateClassStart(StringBuilder sb)
protected void
generateDeclarations(StringBuilder sb)
protected void
generateInitFieldsMethod(StringBuilder sb)
protected void
generateInitParamsMethod(StringBuilder sb)
protected void
generateInitVarsMethod(StringBuilder sb)
protected String
generateMethod(byte evaluationType, List<JRExpression> expressionsList)
protected void
writeExpression(StringBuilder expressionBuffer, JRExpression expression, byte evaluationType)
protected void
writeMethodEnd(StringBuilder sb)
protected void
writeMethodHeader(StringBuilder sb, byte evaluationType, int methodIndex)
protected void
writeNextMethodCall(StringBuilder sb, byte evaluationType, int methodIndex, int startId)
-
-
-
Field Detail
-
PROPERTY_MAX_METHOD_SIZE
public static final String PROPERTY_MAX_METHOD_SIZE
Property that determines the maximum size of a generated groovy method- See Also:
- Constant Field Values
-
sourceTask
protected final JRSourceCompileTask sourceTask
-
parametersMap
protected Map<String,? extends JRParameter> parametersMap
-
variablesMap
protected Map<String,JRVariable> variablesMap
-
variables
protected JRVariable[] variables
-
-
Constructor Detail
-
JRGroovyGenerator
protected JRGroovyGenerator(JRSourceCompileTask sourceTask, ReportClassFilter classFilter)
-
-
Method Detail
-
generateClass
public static String generateClass(JRSourceCompileTask sourceTask) throws JRException
- Throws:
JRException
-
generateClass
public static String generateClass(JRSourceCompileTask sourceTask, ReportClassFilter classFilter) throws JRException
- Throws:
JRException
-
generateClass
protected String generateClass() throws JRException
- Throws:
JRException
-
generateClassStart
protected final void generateClassStart(StringBuilder sb)
-
generateDeclarations
protected final void generateDeclarations(StringBuilder sb)
-
generateInitParamsMethod
protected final void generateInitParamsMethod(StringBuilder sb) throws JRException
- Throws:
JRException
-
generateInitFieldsMethod
protected final void generateInitFieldsMethod(StringBuilder sb) throws JRException
- Throws:
JRException
-
generateInitVarsMethod
protected final void generateInitVarsMethod(StringBuilder sb) throws JRException
- Throws:
JRException
-
generateMethod
protected final String generateMethod(byte evaluationType, List<JRExpression> expressionsList) throws JRException
- Throws:
JRException
-
writeMethodHeader
protected void writeMethodHeader(StringBuilder sb, byte evaluationType, int methodIndex)
-
writeMethodEnd
protected void writeMethodEnd(StringBuilder sb)
-
writeNextMethodCall
protected void writeNextMethodCall(StringBuilder sb, byte evaluationType, int methodIndex, int startId)
-
writeExpression
protected void writeExpression(StringBuilder expressionBuffer, JRExpression expression, byte evaluationType)
-
-