org.sonar.colorizer
Class CodeReader
java.lang.Object
org.sonar.colorizer.CodeReader
public class CodeReader
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LAST_CHARS_MAX_SIZE
public static final int LAST_CHARS_MAX_SIZE
- See Also:
- Constant Field Values
PEEK_TO_WINDOW_SIZE
public static final int PEEK_TO_WINDOW_SIZE
- See Also:
- Constant Field Values
CodeReader
public CodeReader(Reader reader)
CodeReader
public CodeReader(String code)
mark
public final void mark(int readAheadLimit)
throws IOException
- Throws:
IOException
lastChar
public final int lastChar()
peek
public final int peek()
pop
public final int pop()
popTo
public String popTo(EndTokenMatcher matcher)
peekTo
public String peekTo(EndTokenMatcher matcher)
peekTo
protected String peekTo(EndTokenMatcher matcher,
int lookAheadLimit)
close
public void close()
peek
public char[] peek(int index)
lastChar
public int lastChar(int index)
setVariable
public void setVariable(Object key,
Object value)
- Save a stateful variable.
- Parameters:
key
- can NOT be nullvalue
- can be null
getVariable
public Object getVariable(Object key)
- Get a stateful variable. Return null if not found.
getVariable
public Object getVariable(Object key,
Object defaultValue)
- Get a stateful variable. Return the default value if not found.
getVariables
public Map getVariables()
- All stateful variables
Copyright © 2009-2010 SonarSource SA. All Rights Reserved.