Package org.apache.sling.scripting.core
Class ScriptNameAwareReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.FilterReader
-
- org.apache.sling.scripting.core.ScriptNameAwareReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Readable
,ScriptNameAware
public final class ScriptNameAwareReader extends java.io.FilterReader implements ScriptNameAware
TheScriptNameAwareReader
is aFilterReader
marked with theScriptNameAware
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 aScriptNameAwareReader
based on anotherReader
.
-
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 markedReader
implementation.
-
-
-
Method Detail
-
getScriptName
public java.lang.String getScriptName()
Description copied from interface:ScriptNameAware
Returns the name of the script provided by a markedReader
implementation.- Specified by:
getScriptName
in interfaceScriptNameAware
- Returns:
- the script's name
-
-