Class Inspector

All Implemented Interfaces:
Serializable

public class Inspector extends AbstractSequenceContent
An Inspector represents the submitted source code, file by file. Also, it stores the comments of all Graja results within the line the comments belong to (code-oriented).
See Also:
  • Constructor Details

    • Inspector

      public Inspector(List<File> sourceFiles, IncludeSpec includeSpec)
      This constructor loads all given sourceFiles as InspectorFile
      Parameters:
      sourceFiles - The source code files
      includeSpec - includeSpecs
  • Method Details

    • showFirstFileHavingLineInfo

      public void showFirstFileHavingLineInfo()
      Detects the first file having at least one line info and shows this file while hiding all other files.
    • getFiles

      public List<InspectorFile> getFiles()
      Returns:
      a list of the files
    • getFile

      public InspectorFile getFile(String filename)
      Parameters:
      filename - The file name of the InspectorFile to get
      Returns:
      The InspectorFile of the given file name
    • getFileNames

      public List<String> getFileNames()
      Returns:
      a list of the filenames
    • getContents

      public Iterable<Content> getContents()
      Returns:
      a list of all contents.
    • getNestedContents

      public Iterable<Content> getNestedContents()
      Specified by:
      getNestedContents in class Content
      Returns:
      the set of contents nested in this content. Nested contents can be list items in a List, elements in a Sequence, elements in a Grid, elements in a Paragraph, and so on. If this is a leaf content, the returned set is empty.
    • renderHtmlImpl

      public void renderHtmlImpl(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx, boolean useJavascript)
      Description copied from class: Content
      render content to HTML. This method is meant to be overriden by subclasses.
      Specified by:
      renderHtmlImpl in class Content
      Parameters:
      sb - HTML code result
      includeInfo - controls, which content to be rendered.
      ctx - render context
      useJavascript - if true, the generated HTML code will contain Javascript
      See Also:
      • de.hsh.graja.util.comment.Content#renderHtml(StringBuilder, IncludeInfo, RenderContext)
    • renderPlainImpl

      public void renderPlainImpl(StringBuilder appender, IncludeInfo includeInfo, RenderContext ctx)
      Description copied from class: Content
      render content to plain text. This method is meant to be overriden by subclasses.
      Specified by:
      renderPlainImpl in class Content
      Parameters:
      appender - plain text result
      includeInfo - controls, which content to be rendered.
      ctx - render context (unused).
      See Also: