View Javadoc

1   /*
2    * @(#) LineNumber.java Jan 12, 2004
3    * 
4    * Copyright (c) 2003 Delft University of Technology Jaffalaan 5, 2628 BX Delft,
5    * the Netherlands All rights reserved.
6    * 
7    * This software is proprietary information of Delft University of Technology
8    * The code is published under the General Public License
9    */
10  package nl.tudelft.simulation.dsol.interpreter.classfile;
11  
12  import java.io.DataInput;
13  import java.io.IOException;
14  
15  /***
16   * A LineNumber <br>
17   * (c) copyright 2003 <a href="http://www.simulation.tudelft.nl">Delft
18   * University of Technology </a>, the Netherlands. <br>
19   * See for project information <a
20   * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
21   * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
22   * License (GPL) </a>, no warranty <br>
23   * 
24   * @version 1.0 Jan 12, 2004 <br>
25   * @author <a href="http://www.simulation.tudelft.nl/people/jacobs.html">Peter
26   *         Jacobs </a>
27   */
28  public class LineNumber
29  {
30  	/*** the startByte attribute */
31  	private int startByte = -1;
32  
33  	/*** the lineNumber attribute */
34  	private int lineNumber = -1;
35  
36  	/***
37  	 * constructs a new LineNumber
38  	 * 
39  	 * @param dataInput dataInput to use
40  	 * @throws IOException on failure
41  	 */
42  	public LineNumber(final DataInput dataInput) throws IOException
43  	{
44  		super();
45  		this.startByte = dataInput.readUnsignedShort();
46  		this.lineNumber = dataInput.readUnsignedShort();
47  	}
48  
49  	/***
50  	 * @return Returns the lineNumber.
51  	 */
52  	public int getLineNumber()
53  	{
54  		return this.lineNumber;
55  	}
56  
57  	/***
58  	 * @return Returns the startByte.
59  	 */
60  	public int getStartByte()
61  	{
62  		return this.startByte;
63  	}
64  }