edu.rice.cs.drjava.model
Class DummyDocumentRegion

java.lang.Object
  extended by edu.rice.cs.drjava.model.DummyDocumentRegion
All Implemented Interfaces:
FileRegion, Region

public class DummyDocumentRegion
extends Object
implements FileRegion

The concrete class for "dummy document" regions produced by ProjectFileParser. These degenerate regions, which do not include a document, are only used transiently during project file input processing.

Version:
$Id: DummyDocumentRegion.java 5175 2010-01-20 08:46:32Z mgricken $

Field Summary
protected  int _endOffset
           
protected  File _file
           
protected  int _startOffset
           
 
Constructor Summary
DummyDocumentRegion(File file, int so, int eo)
          Create a new dummy document region (dummy because no document yet exists)
 
Method Summary
 int getEndOffset()
          Copied from Region*.
 File getFile()
           
 int getStartOffset()
          Copied from Region*.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_file

protected final File _file

_startOffset

protected volatile int _startOffset

_endOffset

protected volatile int _endOffset
Constructor Detail

DummyDocumentRegion

public DummyDocumentRegion(File file,
                           int so,
                           int eo)
Create a new dummy document region (dummy because no document yet exists)

Parameters:
file - file that contains the region
so - start offset of the region; if doc is non-null, then a Position will be created that moves within the document
eo - end offset of the region; if doc is non-null, then a Position will be created that moves within the document
Method Detail

getFile

public File getFile()
Specified by:
getFile in interface FileRegion
Returns:
the file

getStartOffset

public int getStartOffset()
Description copied from interface: FileRegion
Copied from Region*.

Specified by:
getStartOffset in interface FileRegion
Specified by:
getStartOffset in interface Region
Returns:
the start offset

getEndOffset

public int getEndOffset()
Description copied from interface: FileRegion
Copied from Region*.

Specified by:
getEndOffset in interface FileRegion
Specified by:
getEndOffset in interface Region
Returns:
the end offset