@HashCodeAndEqualsPlugin.Enhance public static class Plugin.Engine.Source.Element.ForFile extends java.lang.Object implements Plugin.Engine.Source.Element
Plugin.Engine.Source.Element.ForByteArray, Plugin.Engine.Source.Element.ForFile, Plugin.Engine.Source.Element.ForJarEntry| Modifier and Type | Field and Description |
|---|---|
private java.io.File |
file
The file location of the represented file that is located within the root directory.
|
private java.io.File |
root
The root folder of the represented source.
|
| Constructor and Description |
|---|
ForFile(java.io.File root,
java.io.File file)
Creates an element representation for a file.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getInputStream()
Returns an input stream to read this element's binary information.
|
java.lang.String |
getName()
Returns the element's relative path and name.
|
<T> T |
resolveAs(java.lang.Class<T> type)
Resolves this element to a more specialized form if possible.
|
private final java.io.File root
private final java.io.File file
public ForFile(java.io.File root,
java.io.File file)
root - The root folder of the represented source.file - The file location of the represented file that is located within the root directory.public java.lang.String getName()
getName in interface Plugin.Engine.Source.Elementpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface Plugin.Engine.Source.Elementjava.io.IOException - If an I/O error occurs.public <T> T resolveAs(java.lang.Class<T> type)
resolveAs in interface Plugin.Engine.Source.ElementT - The requested spezialized type.type - The requested spezialized type.null if a transformation is impossible.