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 classSpecReader.State
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringBuilderastprotected java.lang.StringBuildercommentprotected intcommentLineNumberprotected booleancompoundSectionsprotected intcontentLineNumberstatic java.lang.StringEXAMPLE_BREAKstatic java.lang.StringEXAMPLE_KEYWORDstatic java.lang.StringEXAMPLE_STARTstatic java.lang.StringEXAMPLE_START_NBSPstatic java.lang.StringEXAMPLE_TEST_BREAKstatic java.lang.StringEXAMPLE_TEST_STARTprotected intexampleNumberprotected java.util.List<SpecExample>examplesprotected java.lang.StringBuilderhtmlprotected @NotNull java.io.InputStreaminputStreamprotected intlastSectionLevelprotected intlineNumberstatic java.lang.StringOPTIONS_KEYWORDstatic java.util.regex.PatternOPTIONS_PATTERNstatic java.lang.StringOPTIONS_STRINGprotected java.lang.StringoptionsSetprotected @NotNull ResourceLocationresourceLocationprotected java.lang.Stringsectionstatic java.lang.StringSECTION_BREAKprotected static java.util.regex.PatternSECTION_PATTERNstatic java.lang.StringSECTION_TEST_BREAKprotected java.lang.String[]sectionsprotected java.lang.StringBuildersourceprotected SpecReader.Statestate
-
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 voidaddSpecExample(@NotNull SpecExample example)protected voidaddSpecLine(java.lang.String line, boolean isSpecExampleOpen)static @NotNull SpecReadercreate(@NotNull ResourceLocation location, boolean compoundSections)static <S extends SpecReader>
Screate(@NotNull ResourceLocation location, @NotNull SpecReaderFactory<S> readerFactory)static @NotNull SpecReadercreateAndReadExamples(@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.StringgetFileUrl()@NotNull ResourceLocationgetResourceLocation()protected voidprocessLine(java.lang.String line)voidreadExamples()protected voidresetContents()
-
-
-
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()
-
-