net.sf.jasperreports.engine.design
Class JRDefaultCompilationSourceCode

java.lang.Object
  extended by net.sf.jasperreports.engine.design.JRDefaultCompilationSourceCode
All Implemented Interfaces:
JRCompilationSourceCode

public class JRDefaultCompilationSourceCode
extends java.lang.Object
implements JRCompilationSourceCode

Default JRCompilationSourceCode implementation that can receive a list of expressions corresponding to lines in the code.

Version:
$Id: JRDefaultCompilationSourceCode.java 4595 2011-09-08 15:55:10Z teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)

Constructor Summary
JRDefaultCompilationSourceCode(java.lang.String sourceCode, JRExpression[] lineExpressions)
          Constructor.
 
Method Summary
 java.lang.String getCode()
          Returns the source code.
 JRExpression getExpressionAtLine(int line)
          Determines whether a line of code corresponds to a report expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JRDefaultCompilationSourceCode

public JRDefaultCompilationSourceCode(java.lang.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 java.lang.String getCode()
Description copied from interface: JRCompilationSourceCode
Returns the source code.

Specified by:
getCode in interface JRCompilationSourceCode
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 interface JRCompilationSourceCode
Parameters:
line - the line number
Returns:
the expression to which the line of code corresponds if any and null otherwise


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com