Class ScriptNameAwareReader

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

    public final class ScriptNameAwareReader
    extends java.io.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.
    • Field Summary

      • Fields inherited from class java.io.FilterReader

        in
      • Fields inherited from class java.io.Reader

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      ScriptNameAwareReader​(java.io.Reader in, java.lang.String scriptName)
      Creates a ScriptNameAwareReader based on another Reader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getScriptName()  
      • Methods inherited from class java.io.FilterReader

        close, mark, markSupported, read, read, ready, reset, skip
      • Methods inherited from class java.io.Reader

        nullReader, read, read, transferTo
      • Methods inherited from class java.lang.Object

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

      • ScriptNameAwareReader

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

      • getScriptName

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