Class DirectoryContextSource
- java.lang.Object
-
- org.jetbrains.java.decompiler.struct.DirectoryContextSource
-
- All Implemented Interfaces:
IContextSource
public class DirectoryContextSource extends java.lang.Object implements IContextSource
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jetbrains.java.decompiler.main.extern.IContextSource
IContextSource.Entries, IContextSource.Entry, IContextSource.IOutputSink
-
-
Field Summary
-
Fields inherited from interface org.jetbrains.java.decompiler.main.extern.IContextSource
CLASS_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description DirectoryContextSource(IBytecodeProvider legacyProvider, java.io.File baseDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IContextSource.IOutputSinkcreateOutputSink(IResultSaver saver)Create a sink that can write the decompiled output from this context element.IContextSource.EntriesgetEntries()Get a listing of all entries in this context unit.java.io.InputStreamgetInputStream(java.lang.String resource)Get an input stream for a specific resource.java.lang.StringgetName()Get a human-readable name to identify this context source.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jetbrains.java.decompiler.main.extern.IContextSource
getClassBytes, getInputStream
-
-
-
-
Constructor Detail
-
DirectoryContextSource
public DirectoryContextSource(IBytecodeProvider legacyProvider, java.io.File baseDirectory)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:IContextSourceGet a human-readable name to identify this context source.- Specified by:
getNamein interfaceIContextSource- Returns:
- a human-readable name
-
getEntries
public IContextSource.Entries getEntries()
Description copied from interface:IContextSourceGet a listing of all entries in this context unit.- Specified by:
getEntriesin interfaceIContextSource- Returns:
- the entries in this unit
-
getInputStream
public java.io.InputStream getInputStream(java.lang.String resource) throws java.io.IOExceptionDescription copied from interface:IContextSourceGet an input stream for a specific resource. This will returnnullif a directory is requested.- Specified by:
getInputStreamin interfaceIContextSource- Parameters:
resource- the resource to request- Returns:
- an input stream
- Throws:
java.io.IOException- if an input stream could not be opened
-
createOutputSink
public IContextSource.IOutputSink createOutputSink(IResultSaver saver)
Description copied from interface:IContextSourceCreate a sink that can write the decompiled output from this context element.If this context source type does not support writing, return a null sink.
- Specified by:
createOutputSinkin interfaceIContextSource- Parameters:
saver- the source result saver for this decompiler, for delegation- Returns:
- the output sink, or null if unwritable
-
-