Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.antlr
Class SourceBuffer

    java.lang.Object
      org.codehaus.groovy.antlr.SourceBuffer

    public class SourceBuffer
    extends Object

A simple buffer that provides line/col access to chunks of source code held within itself.

Version:
  $Revision: 7922 $
Author:
  Jeremy Rayner

Constructor Summary
Constructor and Description
`SourceBuffer()`

Method Summary
Modifier and Type | Method and Description
--- | ---
`String` | `getSnippet(LineColumn start, LineColumn end)` Obtains a snippet of the source code within the bounds specified
`void` | `write(int c)` Writes the specified character into the buffer

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SourceBuffer

    public SourceBuffer()

Method Detail

### getSnippet

    public 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

### write

    public void write(int c)

  Writes the specified character into the buffer

  Parameters:
    `c` -

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2003-2010 The Codehaus. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD