org.codehaus.plexus.util

Class LineOrientedInterpolatingReader

public class LineOrientedInterpolatingReader extends FilterReader

Author: jdcasey Created on Feb 3, 2005

Field Summary
Mapcontext
static charCARRIAGE_RETURN_CHAR
static StringDEFAULT_END_DELIM
static StringDEFAULT_ESCAPE_SEQ
static StringDEFAULT_START_DELIM
StringendDelim
StringescapeSeq
Stringline
intlineIdx
intminExpressionSize
static charNEWLINE_CHAR
PushbackReaderpushbackReader
Reflectorreflector
StringstartDelim
Constructor Summary
LineOrientedInterpolatingReader(Reader reader, Map context, String startDelim, String endDelim, String escapeSeq)
LineOrientedInterpolatingReader(Reader reader, Map context, String startDelim, String endDelim)
LineOrientedInterpolatingReader(Reader reader, Map context)
Method Summary
MapevaluateExpressions(Set expressions)
StringfindAndReplaceUnlessEscaped(String rawLine, String search, String replace)
intfindDelimiter(String rawLine, String delimiter, int lastPos)
SetparseForExpressions(String rawLine)
intread()
intread(char[] cbuf, int off, int len)
voidreadAndInterpolateLine()
StringreadLine()
StringreplaceWithInterpolatedValues(String rawLine, Map evaluatedExpressions)
longskip(long n)

Field Detail

context

private final Map context

CARRIAGE_RETURN_CHAR

private static final char CARRIAGE_RETURN_CHAR

DEFAULT_END_DELIM

public static final String DEFAULT_END_DELIM

DEFAULT_ESCAPE_SEQ

public static final String DEFAULT_ESCAPE_SEQ

DEFAULT_START_DELIM

public static final String DEFAULT_START_DELIM

endDelim

private final String endDelim

escapeSeq

private final String escapeSeq

line

private String line

lineIdx

private int lineIdx

minExpressionSize

private final int minExpressionSize

NEWLINE_CHAR

private static final char NEWLINE_CHAR

pushbackReader

private final PushbackReader pushbackReader

reflector

private final Reflector reflector

startDelim

private final String startDelim

Constructor Detail

LineOrientedInterpolatingReader

public LineOrientedInterpolatingReader(Reader reader, Map context, String startDelim, String endDelim, String escapeSeq)

LineOrientedInterpolatingReader

public LineOrientedInterpolatingReader(Reader reader, Map context, String startDelim, String endDelim)

LineOrientedInterpolatingReader

public LineOrientedInterpolatingReader(Reader reader, Map context)

Method Detail

evaluateExpressions

private Map evaluateExpressions(Set expressions)

findAndReplaceUnlessEscaped

private String findAndReplaceUnlessEscaped(String rawLine, String search, String replace)

findDelimiter

private int findDelimiter(String rawLine, String delimiter, int lastPos)

parseForExpressions

private Set parseForExpressions(String rawLine)

read

public int read()

read

public int read(char[] cbuf, int off, int len)

readAndInterpolateLine

private void readAndInterpolateLine()

readLine

private String readLine()

replaceWithInterpolatedValues

private String replaceWithInterpolatedValues(String rawLine, Map evaluatedExpressions)

skip

public long skip(long n)