Class SpecReader
- java.lang.Object
-
- com.vladsch.flexmark.test.util.spec.SpecReader
-
- Direct Known Subclasses:
DumpSpecReader
public class SpecReader extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
SpecReader.State
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringBuilder
ast
protected java.lang.StringBuilder
comment
protected int
commentLineNumber
protected boolean
compoundSections
protected int
contentLineNumber
static java.lang.String
EXAMPLE_BREAK
static java.lang.String
EXAMPLE_KEYWORD
static java.lang.String
EXAMPLE_START
static java.lang.String
EXAMPLE_START_NBSP
static java.lang.String
EXAMPLE_TEST_BREAK
static java.lang.String
EXAMPLE_TEST_START
protected int
exampleNumber
protected java.util.List<SpecExample>
examples
protected java.lang.StringBuilder
html
protected @NotNull java.io.InputStream
inputStream
protected int
lastSectionLevel
protected int
lineNumber
static java.lang.String
OPTIONS_KEYWORD
static java.util.regex.Pattern
OPTIONS_PATTERN
static java.lang.String
OPTIONS_STRING
protected java.lang.String
optionsSet
protected @NotNull ResourceLocation
resourceLocation
protected java.lang.String
section
static java.lang.String
SECTION_BREAK
protected static java.util.regex.Pattern
SECTION_PATTERN
static java.lang.String
SECTION_TEST_BREAK
protected java.lang.String[]
sections
protected java.lang.StringBuilder
source
protected SpecReader.State
state
-
Constructor Summary
Constructors Constructor Description SpecReader(@NotNull java.io.InputStream stream, @NotNull ResourceLocation location, boolean compoundSections)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addSpecExample(@NotNull SpecExample example)
protected void
addSpecLine(java.lang.String line, boolean isSpecExampleOpen)
static @NotNull SpecReader
create(@NotNull ResourceLocation location, boolean compoundSections)
static <S extends SpecReader>
Screate(@NotNull ResourceLocation location, @NotNull SpecReaderFactory<S> readerFactory)
static @NotNull SpecReader
createAndReadExamples(@NotNull ResourceLocation location, boolean compoundSections)
static <S extends SpecReader>
ScreateAndReadExamples(@NotNull ResourceLocation location, @NotNull SpecReaderFactory<S> readerFactory)
@NotNull java.util.List<SpecExample>
getExamples()
@NotNull java.util.List<java.lang.String>
getExamplesSourceAsString()
@NotNull java.lang.String
getFileUrl()
@NotNull ResourceLocation
getResourceLocation()
protected void
processLine(java.lang.String line)
void
readExamples()
protected void
resetContents()
-
-
-
Field Detail
-
EXAMPLE_KEYWORD
public static final java.lang.String EXAMPLE_KEYWORD
- See Also:
- Constant Field Values
-
EXAMPLE_BREAK
public static final java.lang.String EXAMPLE_BREAK
- See Also:
- Constant Field Values
-
EXAMPLE_START
public static final java.lang.String EXAMPLE_START
- See Also:
- Constant Field Values
-
EXAMPLE_START_NBSP
public static final java.lang.String EXAMPLE_START_NBSP
- See Also:
- Constant Field Values
-
EXAMPLE_TEST_BREAK
public static final java.lang.String EXAMPLE_TEST_BREAK
- See Also:
- Constant Field Values
-
EXAMPLE_TEST_START
public static final java.lang.String EXAMPLE_TEST_START
- See Also:
- Constant Field Values
-
OPTIONS_KEYWORD
public static final java.lang.String OPTIONS_KEYWORD
- See Also:
- Constant Field Values
-
OPTIONS_STRING
public static final java.lang.String OPTIONS_STRING
- See Also:
- Constant Field Values
-
OPTIONS_PATTERN
public static final java.util.regex.Pattern OPTIONS_PATTERN
-
SECTION_BREAK
public static final java.lang.String SECTION_BREAK
- See Also:
- Constant Field Values
-
SECTION_TEST_BREAK
public static final java.lang.String SECTION_TEST_BREAK
- See Also:
- Constant Field Values
-
SECTION_PATTERN
protected static final java.util.regex.Pattern SECTION_PATTERN
-
inputStream
@NotNull protected final @NotNull java.io.InputStream inputStream
-
resourceLocation
@NotNull protected final @NotNull ResourceLocation resourceLocation
-
compoundSections
protected final boolean compoundSections
-
examples
protected final java.util.List<SpecExample> examples
-
sections
protected final java.lang.String[] sections
-
lastSectionLevel
protected int lastSectionLevel
-
state
protected SpecReader.State state
-
section
protected java.lang.String section
-
optionsSet
protected java.lang.String optionsSet
-
source
protected java.lang.StringBuilder source
-
html
protected java.lang.StringBuilder html
-
ast
protected java.lang.StringBuilder ast
-
comment
protected java.lang.StringBuilder comment
-
exampleNumber
protected int exampleNumber
-
lineNumber
protected int lineNumber
-
contentLineNumber
protected int contentLineNumber
-
commentLineNumber
protected int commentLineNumber
-
-
Constructor Detail
-
SpecReader
public SpecReader(@NotNull @NotNull java.io.InputStream stream, @NotNull @NotNull ResourceLocation location, boolean compoundSections)
-
-
Method Detail
-
getFileUrl
@NotNull public @NotNull java.lang.String getFileUrl()
-
getResourceLocation
@NotNull public @NotNull ResourceLocation getResourceLocation()
-
getExamples
@NotNull public @NotNull java.util.List<SpecExample> getExamples()
-
getExamplesSourceAsString
@NotNull public @NotNull java.util.List<java.lang.String> getExamplesSourceAsString()
-
create
@NotNull public static @NotNull SpecReader create(@NotNull @NotNull ResourceLocation location, boolean compoundSections)
-
create
@NotNull public static <S extends SpecReader> S create(@NotNull @NotNull ResourceLocation location, @NotNull @NotNull SpecReaderFactory<S> readerFactory)
-
createAndReadExamples
@NotNull public static @NotNull SpecReader createAndReadExamples(@NotNull @NotNull ResourceLocation location, boolean compoundSections)
-
createAndReadExamples
@NotNull public static <S extends SpecReader> S createAndReadExamples(@NotNull @NotNull ResourceLocation location, @NotNull @NotNull SpecReaderFactory<S> readerFactory)
-
readExamples
public void readExamples()
-
addSpecLine
protected void addSpecLine(java.lang.String line, boolean isSpecExampleOpen)
-
addSpecExample
protected void addSpecExample(@NotNull @NotNull SpecExample example)
-
processLine
protected void processLine(java.lang.String line)
-
resetContents
protected void resetContents()
-
-