| 17 | |
| 18 | public class Procyon implements Decompiler { |
| 19 | @Override |
| 20 | public String decompile(ClassInstance cls, ClassFeatureExtractor env, NameType nameType) { |
| 21 | DecompilerSettings settings = DecompilerSettings.javaDefaults(); |
| 22 | settings.setShowSyntheticMembers(true); |
| 23 | settings.setTypeLoader(new CompositeTypeLoader( |
| 24 | new TypeLoader(env, nameType), |
| 25 | new ClasspathTypeLoader())); |
| 26 | |
| 27 | PlainTextOutput out = new PlainTextOutput(); |
| 28 | |
| 29 | com.strobel.decompiler.Decompiler.decompile(cls.getName(nameType), out, settings); |
| 30 | |
| 31 | return out.toString(); |
| 32 | } |
| 33 | |
| 34 | private static class TypeLoader implements ITypeLoader { |
| 35 | TypeLoader(ClassFeatureExtractor env, NameType nameType) { |