public class SpecReader extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SpecReader.State |
| Modifier and Type | Field and Description |
|---|---|
protected StringBuilder |
ast |
protected StringBuilder |
comment |
protected int |
commentLineNumber |
protected boolean |
compoundSections |
protected int |
contentLineNumber |
static String |
EXAMPLE_BREAK |
static String |
EXAMPLE_KEYWORD |
static String |
EXAMPLE_START |
static String |
EXAMPLE_START_NBSP |
static String |
EXAMPLE_TEST_BREAK |
static String |
EXAMPLE_TEST_START |
protected int |
exampleNumber |
protected List<SpecExample> |
examples |
protected StringBuilder |
html |
protected @NotNull InputStream |
inputStream |
protected int |
lastSectionLevel |
protected int |
lineNumber |
static String |
OPTIONS_KEYWORD |
static Pattern |
OPTIONS_PATTERN |
static String |
OPTIONS_STRING |
protected String |
optionsSet |
protected @NotNull ResourceLocation |
resourceLocation |
protected String |
section |
static String |
SECTION_BREAK |
protected static Pattern |
SECTION_PATTERN |
static String |
SECTION_TEST_BREAK |
protected String[] |
sections |
protected StringBuilder |
source |
protected SpecReader.State |
state |
| Constructor and Description |
|---|
SpecReader(@NotNull InputStream stream,
@NotNull ResourceLocation location,
boolean compoundSections) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSpecExample(@NotNull SpecExample example) |
protected void |
addSpecLine(String line,
boolean isSpecExampleOpen) |
static @NotNull SpecReader |
create(@NotNull ResourceLocation location,
boolean compoundSections) |
static <S extends SpecReader> |
create(@NotNull ResourceLocation location,
@NotNull SpecReaderFactory<S> readerFactory) |
static @NotNull SpecReader |
createAndReadExamples(@NotNull ResourceLocation location,
boolean compoundSections) |
static <S extends SpecReader> |
createAndReadExamples(@NotNull ResourceLocation location,
@NotNull SpecReaderFactory<S> readerFactory) |
@NotNull List<SpecExample> |
getExamples() |
@NotNull List<String> |
getExamplesSourceAsString() |
@NotNull String |
getFileUrl() |
@NotNull ResourceLocation |
getResourceLocation() |
protected void |
processLine(String line) |
void |
readExamples() |
protected void |
resetContents() |
public static final String EXAMPLE_KEYWORD
public static final String EXAMPLE_BREAK
public static final String EXAMPLE_START
public static final String EXAMPLE_START_NBSP
public static final String EXAMPLE_TEST_BREAK
public static final String EXAMPLE_TEST_START
public static final String OPTIONS_KEYWORD
public static final String OPTIONS_STRING
public static final Pattern OPTIONS_PATTERN
public static final String SECTION_BREAK
public static final String SECTION_TEST_BREAK
protected static final Pattern SECTION_PATTERN
@NotNull protected final @NotNull InputStream inputStream
@NotNull protected final @NotNull ResourceLocation resourceLocation
protected final boolean compoundSections
protected final List<SpecExample> examples
protected final String[] sections
protected int lastSectionLevel
protected SpecReader.State state
protected String section
protected String optionsSet
protected StringBuilder source
protected StringBuilder html
protected StringBuilder ast
protected StringBuilder comment
protected int exampleNumber
protected int lineNumber
protected int contentLineNumber
protected int commentLineNumber
public SpecReader(@NotNull
@NotNull InputStream stream,
@NotNull
@NotNull ResourceLocation location,
boolean compoundSections)
@NotNull public @NotNull String getFileUrl()
@NotNull public @NotNull ResourceLocation getResourceLocation()
@NotNull public @NotNull List<SpecExample> getExamples()
@NotNull public static @NotNull SpecReader create(@NotNull @NotNull ResourceLocation location, boolean compoundSections)
@NotNull public static <S extends SpecReader> S create(@NotNull @NotNull ResourceLocation location, @NotNull @NotNull SpecReaderFactory<S> readerFactory)
@NotNull public static @NotNull SpecReader createAndReadExamples(@NotNull @NotNull ResourceLocation location, boolean compoundSections)
@NotNull public static <S extends SpecReader> S createAndReadExamples(@NotNull @NotNull ResourceLocation location, @NotNull @NotNull SpecReaderFactory<S> readerFactory)
public void readExamples()
protected void addSpecLine(String line, boolean isSpecExampleOpen)
protected void addSpecExample(@NotNull
@NotNull SpecExample example)
protected void processLine(String line)
protected void resetContents()
Copyright © 2020. All rights reserved.