Class ScriptNameAwareReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Readable, ScriptNameAware

    public final class ScriptNameAwareReader
    extends java.io.FilterReader
    implements ScriptNameAware
    The ScriptNameAwareReader is a FilterReader marked with the ScriptNameAware interface. This reader allows retrieving the contained script's name.
    • 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()
      Returns the name of the script provided by a marked Reader implementation.
      • 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

        equals, 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()
        Description copied from interface: ScriptNameAware
        Returns the name of the script provided by a marked Reader implementation.
        Specified by:
        getScriptName in interface ScriptNameAware
        Returns:
        the script's name