Package net.bytebuddy.build
Interface Plugin.Engine.Source.Element
-
- All Known Implementing Classes:
Plugin.Engine.Source.Element.ForByteArray
,Plugin.Engine.Source.Element.ForFile
,Plugin.Engine.Source.Element.ForJarEntry
- Enclosing interface:
- Plugin.Engine.Source
public static interface Plugin.Engine.Source.Element
Represents a binary element found in a source location.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Plugin.Engine.Source.Element.ForByteArray
An element representation for a byte array.static class
Plugin.Engine.Source.Element.ForFile
An element representation for a file.static class
Plugin.Engine.Source.Element.ForJarEntry
Represents a jar file entry as an element.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the element's relative path and name.- Returns:
- The element's path and name.
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOException
Returns an input stream to read this element's binary information.- Returns:
- An input stream that represents this element's binary information.
- Throws:
java.io.IOException
- If an I/O error occurs.
-
resolveAs
<T> T resolveAs(java.lang.Class<T> type)
Resolves this element to a more specialized form if possible. Doing so allows for performance optimizations if more specialized formats are available.- Type Parameters:
T
- The requested spezialized type.- Parameters:
type
- The requested spezialized type.- Returns:
- The resolved element or
null
if a transformation is impossible.
-
-