Class ScriptNameAwareReader

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Readable, org.apache.sling.scripting.api.ScriptNameAware

    public final class ScriptNameAwareReader
    extends FilterReader
    implements org.apache.sling.scripting.api.ScriptNameAware
    The ScriptNameAwareReader is a FilterReader marked with the ScriptNameAware interface. This reader allows retrieving the contained script's name.
    • Constructor Detail

      • ScriptNameAwareReader

        public ScriptNameAwareReader​(Reader in,
                                     String scriptName)
        Creates a ScriptNameAwareReader based on another Reader.
        Parameters:
        in - the base Reader
        scriptName - the script's name
    • Method Detail

      • getScriptName

        public String getScriptName()
        Specified by:
        getScriptName in interface org.apache.sling.scripting.api.ScriptNameAware