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 String
baseName
Bundle base name.private String
extension
Common extension of files which are included in the resource bundle.private Set<File>
files
Set of files which are included in the resource bundle.private String
path
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
All Methods Instance Methods Concrete Methods 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.String
getBaseName()
Returns the bundle base name.String
getExtension()
Returns the common extension of files which are included in the resource bundle.Set<File>
getFiles()
Returns the set of files which are included in the resource bundle.String
getPath()
Returns the common path of files which are included in the resource bundle.
-
-
-
Constructor Detail
-
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 Detail
-
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.
-
-