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 TypeMethodDescriptionIdentifier of the language used for CLI options and dynamic loading.getName()Descriptive name of the language.default booleanDetermines whether a fixed-width font should be used to display that language.intMinimum number of tokens required for a match.Parses a set of files.String[]suffixes()Suffixes for the files containing code of the language.default booleanIndicates 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 StringIf 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
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
If the language uses representation files, this method returns the suffix used for the representation files.
-