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.ElementRepresents a binary element found in a source location.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPlugin.Engine.Source.Element.ForByteArrayAn element representation for a byte array.static classPlugin.Engine.Source.Element.ForFileAn element representation for a file.static classPlugin.Engine.Source.Element.ForJarEntryRepresents a jar file entry as an element.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStreamgetInputStream()Returns an input stream to read this element's binary information.java.lang.StringgetName()Returns the element's relative path and name.<T> TresolveAs(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. If the name ends with a/, it represents a folder.- Returns:
- The element's path and name.
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOExceptionReturns an input stream to read this element's binary information. Must not be invoked for folders.- Returns:
- An input stream that represents this element's binary information.
- Throws:
java.io.IOException- If an I/O error occurs.
-
resolveAs
@MaybeNull <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
nullif a transformation is impossible.
-
-