Class ConventionNameTransformer
-
- All Implemented Interfaces:
-
java.io.Serializable
public final class ConventionNameTransformer extends IconNameTransformer
Naming transformer based on naming conventions.
Supports common naming patterns with optional prefix/suffix.
Example:
val transformer = ConventionNameTransformer( convention = NamingConvention.PASCAL_CASE, suffix = "Icon" ) transformer.transform("arrow-left") // → "ArrowLeftIcon"
-
-
Constructor Summary
Constructors Constructor Description ConventionNameTransformer(NamingConvention convention, String suffix, String prefix, String removePrefix, String removeSuffix)
-
Method Summary
Modifier and Type Method Description Stringtransform(String fileName)Transform an icon file name into a valid Kotlin class name. StringgetSignature()Override getSignature to include constructor parameters in the signature. -
-
Constructor Detail
-
ConventionNameTransformer
ConventionNameTransformer(NamingConvention convention, String suffix, String prefix, String removePrefix, String removeSuffix)
-
-
Method Detail
-
transform
String transform(String fileName)
Transform an icon file name into a valid Kotlin class name.
- Parameters:
fileName- The file name (with or without .- Returns:
Transformed Kotlin class name
-
getSignature
String getSignature()
Override getSignature to include constructor parameters in the signature. This ensures that changes to the transformer configuration are detected by Gradle's cache.
-
-
-
-