Class JRDefaultCompilationSourceCode
- java.lang.Object
-
- net.sf.jasperreports.engine.design.JRDefaultCompilationSourceCode
-
- All Implemented Interfaces:
JRCompilationSourceCode
public class JRDefaultCompilationSourceCode extends Object implements JRCompilationSourceCode
DefaultJRCompilationSourceCode
implementation that can receive a list of expressions corresponding to lines in the code.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description JRDefaultCompilationSourceCode(String sourceCode, JRExpression[] lineExpressions)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCode()
Returns the source code.JRExpression
getExpressionAtLine(int line)
Determines whether a line of code corresponds to a report expression.
-
-
-
Constructor Detail
-
JRDefaultCompilationSourceCode
public JRDefaultCompilationSourceCode(String sourceCode, JRExpression[] lineExpressions)
Constructor.- Parameters:
sourceCode
- the source code.lineExpressions
- an array of expressions corresponding to line numbers. Can be null.
-
-
Method Detail
-
getCode
public String getCode()
Description copied from interface:JRCompilationSourceCode
Returns the source code.- Specified by:
getCode
in interfaceJRCompilationSourceCode
- Returns:
- the source code
-
getExpressionAtLine
public JRExpression getExpressionAtLine(int line)
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
-
-