Package de.jplag

Interface Language


public interface Language
Common interface for all languages. Each language-front end must provide a concrete language implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Identifier of the language used for CLI options and dynamic loading.
    Descriptive name of the language.
    default boolean
    Determines whether a fixed-width font should be used to display that language.
    int
    Minimum number of tokens required for a match.
    parse(Set<File> files)
    Parses a set of files.
    Suffixes for the files containing code of the language.
    default boolean
    Indicates whether the input files (code) should be used as representation in the report, or different files that form a view on the input files.
    default String
    If the language uses representation files, this method returns the suffix used for the representation files.
  • Method Details

    • suffixes

      String[] suffixes()
      Suffixes for the files containing code of the language. An empty array means all suffixes are valid.
    • getName

      String getName()
      Descriptive name of the language.
    • getIdentifier

      String getIdentifier()
      Identifier of the language used for CLI options and dynamic loading. You should use some name within [a-z_-]+
    • minimumTokenMatch

      int minimumTokenMatch()
      Minimum number of tokens required for a match.
    • parse

      List<Token> parse(Set<File> files) throws ParsingException
      Parses a set of files.
      Parameters:
      files - are the files to parse.
      Returns:
      the list of parsed JPlag tokens.
      Throws:
      ParsingException - if an error during parsing the files occurred.
    • isPreformatted

      default boolean isPreformatted()
      Determines whether a fixed-width font should be used to display that language.
    • useViewFiles

      default boolean useViewFiles()
      Indicates whether the input files (code) should be used as representation in the report, or different files that form a view on the input files.
    • viewFileSuffix

      default String viewFileSuffix()
      If the language uses representation files, this method returns the suffix used for the representation files.