Class TranslationCheck.ResourceBundle

java.lang.Object
com.puppycrawl.tools.checkstyle.checks.TranslationCheck.ResourceBundle
Enclosing class:
TranslationCheck

private static final class TranslationCheck.ResourceBundle extends Object
Class which represents a resource bundle.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
    Bundle base name.
    private final String
    Common extension of files which are included in the resource bundle.
    private final Set<File>
    Set of files which are included in the resource bundle.
    private final String
    Common path of files which are included in the resource bundle.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    ResourceBundle(String baseName, String path, String extension)
    Creates a ResourceBundle object with specific base name, common files extension.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addFile(File file)
    Adds a file into resource bundle.
    boolean
    containsFile(String fileNameRegexp)
    Checks whether a resource bundle contains a file which name matches file name regexp.
    Returns the bundle base name.
    Returns the common extension of files which are included in the resource bundle.
    Returns the set of files which are included in the resource bundle.
    Returns the common path of files which are included in the resource bundle.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • baseName

      private final String baseName
      Bundle base name.
    • extension

      private final String extension
      Common extension of files which are included in the resource bundle.
    • path

      private final String path
      Common path of files which are included in the resource bundle.
    • files

      private final Set<File> files
      Set of files which are included in the resource bundle.
  • Constructor Details

    • ResourceBundle

      private ResourceBundle(String baseName, String path, String extension)
      Creates a ResourceBundle object with specific base name, common files extension.
      Parameters:
      baseName - bundle base name.
      path - common path of files which are included in the resource bundle.
      extension - common extension of files which are included in the resource bundle.
  • Method Details

    • getBaseName

      public String getBaseName()
      Returns the bundle base name.
      Returns:
      the bundle base name
    • getPath

      public String getPath()
      Returns the common path of files which are included in the resource bundle.
      Returns:
      the common path of files
    • getExtension

      public String getExtension()
      Returns the common extension of files which are included in the resource bundle.
      Returns:
      the common extension of files
    • getFiles

      public Set<File> getFiles()
      Returns the set of files which are included in the resource bundle.
      Returns:
      the set of files
    • addFile

      public void addFile(File file)
      Adds a file into resource bundle.
      Parameters:
      file - file which should be added into resource bundle.
    • containsFile

      public boolean containsFile(String fileNameRegexp)
      Checks whether a resource bundle contains a file which name matches file name regexp.
      Parameters:
      fileNameRegexp - file name regexp.
      Returns:
      true if a resource bundle contains a file which name matches file name regexp.