Class IconNameTransformer

  • All Implemented Interfaces:
    java.io.Serializable

    
    public abstract class IconNameTransformer
     implements Serializable
                        

    Abstract base class for transforming icon file names into Kotlin class names.

    Different icon libraries may have different naming conventions. This class allows users to implement custom naming transformers for their specific libraries.

    Implementations must be Serializable to support Gradle's configuration cache.

    Example:

    class MyTransformer : IconNameTransformer() {
        override fun transform(fileName: String): String {
            return fileName.uppercase() + "Icon"
        }
    }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract String transform(String fileName) Transform an icon file name into a valid Kotlin class name.
      String getSignature() Provide a stable signature for this transformer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IconNameTransformer

        IconNameTransformer()
    • Method Detail

      • transform

         abstract 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()

        Provide a stable signature for this transformer. This signature is used for Gradle's build cache.

        Default implementation uses the fully qualified class name, which is stable across builds as long as the class definition doesn't change.

        Override this method if you need custom signature logic (e.g., including constructor parameters in the signature).

        Returns:

        Stable signature string for build caching