Class TranslationCheck.ResourceBundle
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.checks.TranslationCheck.ResourceBundle
-
- Enclosing class:
- TranslationCheck
private static class TranslationCheck.ResourceBundle extends java.lang.Object
Class which represents a resource bundle.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringbaseNameBundle base name.private java.lang.StringextensionCommon extension of files which are included in the resource bundle.private java.util.Set<java.io.File>filesSet of files which are included in the resource bundle.private java.lang.StringpathCommon path of files which are included in the resource bundle.
-
Constructor Summary
Constructors Constructor Description ResourceBundle(java.lang.String baseName, java.lang.String path, java.lang.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 voidaddFile(java.io.File file)Adds a file into resource bundle.booleancontainsFile(java.lang.String fileNameRegexp)Checks whether a resource bundle contains a file which name matches file name regexp.java.lang.StringgetBaseName()Returns the bundle base name.java.lang.StringgetExtension()Returns the common extension of files which are included in the resource bundle.java.util.Set<java.io.File>getFiles()Returns the set of files which are included in the resource bundle.java.lang.StringgetPath()Returns the common path of files which are included in the resource bundle.
-
-
-
Field Detail
-
baseName
private final java.lang.String baseName
Bundle base name.
-
extension
private final java.lang.String extension
Common extension of files which are included in the resource bundle.
-
path
private final java.lang.String path
Common path of files which are included in the resource bundle.
-
files
private final java.util.Set<java.io.File> files
Set of files which are included in the resource bundle.
-
-
Constructor Detail
-
ResourceBundle
ResourceBundle(java.lang.String baseName, java.lang.String path, java.lang.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 java.lang.String getBaseName()
Returns the bundle base name.- Returns:
- the bundle base name
-
getPath
public java.lang.String getPath()
Returns the common path of files which are included in the resource bundle.- Returns:
- the common path of files
-
getExtension
public java.lang.String getExtension()
Returns the common extension of files which are included in the resource bundle.- Returns:
- the common extension of files
-
getFiles
public java.util.Set<java.io.File> getFiles()
Returns the set of files which are included in the resource bundle.- Returns:
- the set of files
-
addFile
public void addFile(java.io.File file)
Adds a file into resource bundle.- Parameters:
file- file which should be added into resource bundle.
-
containsFile
public boolean containsFile(java.lang.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.
-
-