aQute.bnd.properties
Class LineTracker

java.lang.Object
  extended by aQute.bnd.properties.LineTracker

public class LineTracker
extends Object


Constructor Summary
protected LineTracker()
          Creates a new line tracker.
 
Method Summary
 int computeNumberOfLines(String text)
           
 String getLineDelimiter(int line)
           
 IRegion getLineInformation(int line)
           
 IRegion getLineInformationOfOffset(int position)
           
 int getLineLength(int line)
           
 int getLineNumberOfOffset(int position)
           
 int getLineOffset(int line)
           
 int getNumberOfLines()
           
 int getNumberOfLines(int position, int length)
           
protected  Document.DelimiterInfo nextDelimiterInfo(String text, int offset)
          Returns the information about the first delimiter found in the given text starting at the given offset.
 void replace(int position, int length, String text)
           
 void set(String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineTracker

protected LineTracker()
Creates a new line tracker.

Method Detail

getLineLength

public final int getLineLength(int line)
                        throws BadLocationException
Throws:
BadLocationException

getLineNumberOfOffset

public final int getLineNumberOfOffset(int position)
                                throws BadLocationException
Throws:
BadLocationException

getLineInformationOfOffset

public final IRegion getLineInformationOfOffset(int position)
                                         throws BadLocationException
Throws:
BadLocationException

getLineInformation

public final IRegion getLineInformation(int line)
                                 throws BadLocationException
Throws:
BadLocationException

getLineOffset

public final int getLineOffset(int line)
                        throws BadLocationException
Throws:
BadLocationException

getNumberOfLines

public final int getNumberOfLines()

getNumberOfLines

public final int getNumberOfLines(int position,
                                  int length)
                           throws BadLocationException
Throws:
BadLocationException

computeNumberOfLines

public final int computeNumberOfLines(String text)

getLineDelimiter

public final String getLineDelimiter(int line)
                              throws BadLocationException
Throws:
BadLocationException

nextDelimiterInfo

protected Document.DelimiterInfo nextDelimiterInfo(String text,
                                                   int offset)
Returns the information about the first delimiter found in the given text starting at the given offset.

Parameters:
text - the text to be searched
offset - the offset in the given text
Returns:
the information of the first found delimiter or null

replace

public final void replace(int position,
                          int length,
                          String text)
                   throws BadLocationException
Throws:
BadLocationException

set

public final void set(String text)


Copyright © 2014 aQute SARL. All rights reserved.