Class SpecReader

  • Direct Known Subclasses:
    DumpSpecReader

    public class SpecReader
    extends java.lang.Object
    • Field Detail

      • 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_PATTERN

        public static final java.util.regex.Pattern OPTIONS_PATTERN
      • 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
      • 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)
      • createAndReadExamples

        @NotNull
        public static @NotNull SpecReader createAndReadExamples​(@NotNull
                                                                @NotNull ResourceLocation location,
                                                                boolean compoundSections)
      • 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()