public class TemplateReader extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
TemplateReader.State |
| Modifier and Type | Field and Description |
|---|---|
static String |
ENTRY_BREAK |
static String |
ENTRY_START |
protected int |
entryNumber |
protected List<TemplateEntry> |
examples |
protected InputStream |
inputStream |
protected StringBuilder |
source |
protected TemplateReader.State |
state |
| Modifier | Constructor and Description |
|---|---|
protected |
TemplateReader(InputStream stream) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSpecLine(String line) |
protected void |
addTemplateEntry(TemplateEntry example) |
static InputStream |
getSpecInputStream() |
static InputStream |
getSpecInputStream(String resource) |
protected void |
processLine(String line) |
protected List<TemplateEntry> |
read() |
static List<TemplateEntry> |
readEntries() |
static List<TemplateEntry> |
readEntries(String resource) |
static List<TemplateEntry> |
readEntries(String resource,
TemplateReaderFactory readerFactory) |
static List<String> |
readExamplesAsString() |
static List<String> |
readExamplesAsString(String resource) |
static List<String> |
readExamplesAsString(String resource,
TemplateReaderFactory readerFactory) |
static String |
readSpec() |
static String |
readSpec(String resource) |
protected void |
resetContents() |
public static final String ENTRY_START
public static final String ENTRY_BREAK
protected final InputStream inputStream
protected TemplateReader.State state
protected StringBuilder source
protected int entryNumber
protected List<TemplateEntry> examples
protected TemplateReader(InputStream stream)
public static List<TemplateEntry> readEntries()
public static List<TemplateEntry> readEntries(String resource)
public static List<TemplateEntry> readEntries(String resource, TemplateReaderFactory readerFactory)
public static List<String> readExamplesAsString(String resource, TemplateReaderFactory readerFactory)
public static String readSpec()
public static InputStream getSpecInputStream()
public static InputStream getSpecInputStream(String resource)
protected List<TemplateEntry> read() throws IOException
IOExceptionprotected void addSpecLine(String line)
protected void addTemplateEntry(TemplateEntry example)
protected void processLine(String line)
protected void resetContents()
Copyright © 2017. All rights reserved.