Class FileTransformer

  • All Implemented Interfaces:
    Transformer

    public final class FileTransformer
    extends java.lang.Object
    implements Transformer
    Allows you to load the contents of a file into a string substitution.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileTransformer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String name()
      the name that will match the ${name:key} the transform is selected that matches the same name.
      GResultOf<java.lang.String> process​(java.lang.String path, java.lang.String key, java.lang.String rawValue)
      When a match is found for ${name:key} the key and the path are passed into the process method.
      • Methods inherited from class java.lang.Object

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

      • FileTransformer

        public FileTransformer()
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: Transformer
        the name that will match the ${name:key} the transform is selected that matches the same name.
        Specified by:
        name in interface Transformer
        Returns:
        the name of the transform
      • process

        public GResultOf<java.lang.String> process​(java.lang.String path,
                                                   java.lang.String key,
                                                   java.lang.String rawValue)
        Description copied from interface: Transformer
        When a match is found for ${name:key} the key and the path are passed into the process method. The returned value replaces the whole ${name:key}
        Specified by:
        process in interface Transformer
        Parameters:
        path - the current path
        key - the key to lookup int this transform.
        rawValue - the whole raw value of the current string to transform.
        Returns:
        the value to replace the ${name:key}