public final class FileResourceNameValidator
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getErrorTextForFileResource(java.lang.String fileNameWithExt,
com.android.resources.ResourceFolderType resourceFolderType)
Validate a single-file resource name.
|
static java.lang.String |
getErrorTextForNameWithoutExtension(java.lang.String fileNameWithoutExt,
com.android.resources.ResourceFolderType resourceFolderType)
Validate a single-file resource name.
|
static void |
validate(java.io.File file,
com.android.resources.ResourceFolderType resourceType)
Validate a single-file resource name.
|
public static void validate(@NonNull
java.io.File file,
@NonNull
com.android.resources.ResourceFolderType resourceType)
throws MergingException
file - the file resource to validate.resourceType - the resource folder type.MergingException - is the resource name is not valid.@Nullable
public static java.lang.String getErrorTextForFileResource(@NonNull
java.lang.String fileNameWithExt,
@NonNull
com.android.resources.ResourceFolderType resourceFolderType)
fileNameWithExt - the resource file name to validate.resourceFolderType - the resource folder type.@Nullable
public static java.lang.String getErrorTextForNameWithoutExtension(@NonNull
java.lang.String fileNameWithoutExt,
@NonNull
com.android.resources.ResourceFolderType resourceFolderType)
fileNameWithoutExt - The resource file name to validate, without an extension.