Package org.codehaus.groovy.antlr
Class SourceBuffer
- java.lang.Object
- 
- org.codehaus.groovy.antlr.SourceBuffer
 
- 
 public class SourceBuffer extends java.lang.ObjectA simple buffer that provides line/col access to chunks of source code held within itself.
- 
- 
Constructor SummaryConstructors Constructor Description SourceBuffer()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetSnippet(LineColumn start, LineColumn end)Obtains a snippet of the source code within the bounds specifiedvoidwrite(int c)Writes the specified character into the buffer
 
- 
- 
- 
Method Detail- 
getSnippetpublic java.lang.String getSnippet(LineColumn start, LineColumn end) Obtains a snippet of the source code within the bounds specified- Parameters:
- start- (inclusive line/ inclusive column)
- end- (inclusive line / exclusive column)
- Returns:
- specified snippet of source code as a String, or null if no source available
 
 - 
writepublic void write(int c) Writes the specified character into the buffer- Parameters:
- c-
 
 
- 
 
-