Top Inners Fields Constructors Methods
com.vladsch.flexmark.test.util.spec

public Class SpecReader

extends Object
Class Inheritance
Known Direct Subclasses
com.vladsch.flexmark.test.util.DumpSpecReader
Imports
com.vladsch.flexmark.test.util.TestUtils, com.vladsch.flexmark.util.misc.Pair, org.jetbrains.annotations.NotNull, java.io.BufferedReader, .IOException, .InputStream, .InputStreamReader, java.nio.charset.StandardCharsets, java.util.ArrayList, .List, java.util.regex.Matcher, .Pattern

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static enum

Field Summary

Modifier and TypeField and Description
protected StringBuilder
protected StringBuilder
protected int
protected final boolean
protected int
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
protected int
protected final List<SpecExample>
protected StringBuilder
protected final @NotNull InputStream
protected int
protected int
public static final String
public static final Pattern
public static final String
protected String
protected final @NotNull ResourceLocation
protected String
public static final String
protected static final Pattern
public static final String
protected final String[]
protected StringBuilder
protected SpecReader.State

Constructor Summary

AccessConstructor and Description
public
SpecReader(@NotNull InputStream stream, @NotNull ResourceLocation location, boolean compoundSections)

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
addSpecLine(String line, boolean isSpecExampleOpen)

public static @NotNull SpecReader
create(@NotNull ResourceLocation location, boolean compoundSections)

public static <S extends SpecReader> S
public static @NotNull SpecReader
createAndReadExamples(@NotNull ResourceLocation location, boolean compoundSections)

public static <S extends SpecReader> S
public @NotNull List<SpecExample>
public @NotNull List<String>
public @NotNull String
public @NotNull ResourceLocation
protected void
public void
protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

astback to summary
protected StringBuilder ast
commentback to summary
protected StringBuilder comment
commentLineNumberback to summary
protected int commentLineNumber
compoundSectionsback to summary
protected final boolean compoundSections
contentLineNumberback to summary
protected int contentLineNumber
EXAMPLE_BREAKback to summary
public static final String EXAMPLE_BREAK
EXAMPLE_KEYWORDback to summary
public static final String EXAMPLE_KEYWORD
EXAMPLE_STARTback to summary
public static final String EXAMPLE_START
EXAMPLE_START_NBSPback to summary
public static final String EXAMPLE_START_NBSP
EXAMPLE_TEST_BREAKback to summary
public static final String EXAMPLE_TEST_BREAK
EXAMPLE_TEST_STARTback to summary
public static final String EXAMPLE_TEST_START
exampleNumberback to summary
protected int exampleNumber
examplesback to summary
protected final List<SpecExample> examples
htmlback to summary
protected StringBuilder html
inputStreamback to summary
protected final @NotNull InputStream inputStream
Annotations
@NotNull
lastSectionLevelback to summary
protected int lastSectionLevel
lineNumberback to summary
protected int lineNumber
OPTIONS_KEYWORDback to summary
public static final String OPTIONS_KEYWORD
OPTIONS_PATTERNback to summary
public static final Pattern OPTIONS_PATTERN
OPTIONS_STRINGback to summary
public static final String OPTIONS_STRING
optionsSetback to summary
protected String optionsSet
resourceLocationback to summary
protected final @NotNull ResourceLocation resourceLocation
Annotations
@NotNull
sectionback to summary
protected String section
SECTION_BREAKback to summary
public static final String SECTION_BREAK
SECTION_PATTERNback to summary
protected static final Pattern SECTION_PATTERN
SECTION_TEST_BREAKback to summary
public static final String SECTION_TEST_BREAK
sectionsback to summary
protected final String[] sections
sourceback to summary
protected StringBuilder source
stateback to summary
protected SpecReader.State state

Constructor Detail

SpecReaderback to summary
public SpecReader(@NotNull InputStream stream, @NotNull ResourceLocation location, boolean compoundSections)

Method Detail

addSpecExampleback to summary
protected void addSpecExample(@NotNull SpecExample example)
addSpecLineback to summary
protected void addSpecLine(String line, boolean isSpecExampleOpen)
createback to summary
public static @NotNull SpecReader create(@NotNull ResourceLocation location, boolean compoundSections)
Annotations
@NotNull
createback to summary
public static <S extends SpecReader> S create(@NotNull ResourceLocation location, @NotNull SpecReaderFactory<S> readerFactory)
Annotations
@NotNull
createAndReadExamplesback to summary
public static @NotNull SpecReader createAndReadExamples(@NotNull ResourceLocation location, boolean compoundSections)
Annotations
@NotNull
createAndReadExamplesback to summary
public static <S extends SpecReader> S createAndReadExamples(@NotNull ResourceLocation location, @NotNull SpecReaderFactory<S> readerFactory)
Annotations
@NotNull
getExamplesback to summary
public @NotNull List<SpecExample> getExamples()
Annotations
@NotNull
getExamplesSourceAsStringback to summary
public @NotNull List<String> getExamplesSourceAsString()
Annotations
@NotNull
getFileUrlback to summary
public @NotNull String getFileUrl()
Annotations
@NotNull
getResourceLocationback to summary
public @NotNull ResourceLocation getResourceLocation()
Annotations
@NotNull
processLineback to summary
protected void processLine(String line)
readExamplesback to summary
public void readExamples()
resetContentsback to summary
protected void resetContents()
com.vladsch.flexmark.test.util.spec back to summary

protected final Enum SpecReader.State

extends Enum<SpecReader.State>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final SpecReader.State
public static final SpecReader.State
public static final SpecReader.State
public static final SpecReader.State
public static final SpecReader.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static SpecReader.State
public static SpecReader.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ASTback to summary
public static final SpecReader.State AST
BEFOREback to summary
public static final SpecReader.State BEFORE
COMMENTback to summary
public static final SpecReader.State COMMENT
HTMLback to summary
public static final SpecReader.State HTML
SOURCEback to summary
public static final SpecReader.State SOURCE

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static SpecReader.State valueOf(String name)
valuesback to summary
public static SpecReader.State[] values()