Class TranslationCheck.ResourceBundle
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.TranslationCheck.ResourceBundle
- Enclosing class:
- TranslationCheck
Class which represents a resource bundle.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
Bundle base name.private final String
Common extension of files which are included in the resource bundle.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
ConstructorsModifierConstructorDescriptionprivate
ResourceBundle
(String baseName, String path, String extension) Creates a ResourceBundle object with specific base name, common files extension. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.getFiles()
Returns the set of files which are included in the resource bundle.getPath()
Returns the common path of files which are included in the resource bundle.
-
Field Details
-
baseName
Bundle base name. -
extension
Common extension of files which are included in the resource bundle. -
path
Common path of files which are included in the resource bundle. -
files
Set of files which are included in the resource bundle.
-
-
Constructor Details
-
ResourceBundle
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
Returns the bundle base name.- Returns:
- the bundle base name
-
getPath
Returns the common path of files which are included in the resource bundle.- Returns:
- the common path of files
-
getExtension
Returns the common extension of files which are included in the resource bundle.- Returns:
- the common extension of files
-
getFiles
Returns the set of files which are included in the resource bundle.- Returns:
- the set of files
-
addFile
Adds a file into resource bundle.- Parameters:
file
- file which should be added into resource bundle.
-
containsFile
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.
-