Class JRDefaultCompilationSourceCode
- java.lang.Object
-
- net.sf.jasperreports.engine.design.JRDefaultCompilationSourceCode
-
- All Implemented Interfaces:
JRCompilationSourceCode
public class JRDefaultCompilationSourceCode extends Object implements JRCompilationSourceCode
DefaultJRCompilationSourceCodeimplementation 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 StringgetCode()Returns the source code.JRExpressiongetExpressionAtLine(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:JRCompilationSourceCodeReturns the source code.- Specified by:
getCodein interfaceJRCompilationSourceCode- Returns:
- the source code
-
getExpressionAtLine
public JRExpression getExpressionAtLine(int line)
Description copied from interface:JRCompilationSourceCodeDetermines whether a line of code corresponds to a report expression.- Specified by:
getExpressionAtLinein interfaceJRCompilationSourceCode- Parameters:
line- the line number- Returns:
- the expression to which the line of code corresponds if any and null otherwise
-
-