org.benf.cfr.reader.state.ClassFileSourceImpl Java Examples
The following examples show how to use
org.benf.cfr.reader.state.ClassFileSourceImpl.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CFRDecompiler.java From java-disassembler with GNU General Public License v3.0 | 5 votes |
@Override public String decompileClassNode(FileContainer container, ClassNode cn) { try { byte[] bytes = JDA.getClassBytes(container, cn); GetOptParser getOptParser = new GetOptParser(); Pair processedArgs = getOptParser.parse(generateMainMethod(), OptionsImpl.getFactory()); List files = (List)processedArgs.getFirst(); Options options = (Options)processedArgs.getSecond(); ClassFileSourceImpl classFileSource = new ClassFileSourceImpl(options); DCCommonState dcCommonState = new DCCommonState(options, classFileSource); return doClass(dcCommonState, bytes); } catch (Exception e) { return parseException(e); } }
Example #2
Source File: PluginRunner.java From cfr with MIT License | 5 votes |
private static DCCommonState initDCState(Map<String, String> optionsMap, ClassFileSource classFileSource) { OptionsImpl options = new OptionsImpl(optionsMap); ClassFileSource2 source = classFileSource == null ? new ClassFileSourceImpl(options) : new ClassFileSourceWrapper(classFileSource); return new DCCommonState(options, source); }
Example #3
Source File: ClassFileSource.java From cfr with MIT License | 4 votes |
/** * @param options Map of options, as per {@link CfrDriver}'s builder. * @return CFR's internal implementation of {@link ClassFileSource} */ static ClassFileSource createInternalClassFileSource(Map<String, String> options) { Options parsedOptions = OptionsImpl.getFactory().create(options); return new ClassFileSourceImpl(parsedOptions); }