Class JRDefaultCompilationSourceCode
java.lang.Object
net.sf.jasperreports.engine.design.JRDefaultCompilationSourceCode
- All Implemented Interfaces:
JRCompilationSourceCode
Default
JRCompilationSourceCode
implementation that can receive
a list of expressions corresponding to lines in the code.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Constructor Summary
ConstructorsConstructorDescriptionJRDefaultCompilationSourceCode
(String sourceCode, JRExpression[] lineExpressions) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetCode()
Returns the source code.getExpressionAtLine
(int line) Determines whether a line of code corresponds to a report expression.
-
Constructor Details
-
JRDefaultCompilationSourceCode
Constructor.- Parameters:
sourceCode
- the source code.lineExpressions
- an array of expressions corresponding to line numbers. Can be null.
-
-
Method Details
-
getCode
Description copied from interface:JRCompilationSourceCode
Returns the source code.- Specified by:
getCode
in interfaceJRCompilationSourceCode
- Returns:
- the source code
-
getExpressionAtLine
Description copied from interface:JRCompilationSourceCode
Determines whether a line of code corresponds to a report expression.- Specified by:
getExpressionAtLine
in interfaceJRCompilationSourceCode
- Parameters:
line
- the line number- Returns:
- the expression to which the line of code corresponds if any and null otherwise
-