Examples of Decompiler


Examples of jode.decompiler.Decompiler

        public String sourceCode() {
            if(sourceCode != null)
                return sourceCode;
            StringWriter writer = new StringWriter();
            try {
                Decompiler decompiler = new Decompiler();
                decompiler.setClassPath(cp);
                decompiler.decompile(classInfo().getName(), writer, null);
            } catch (IOException ex) {
                log.error(ex.toString());
            } catch (jode.AssertError ex) {
                log.error(ex.toString());
                return ex.toString() + " occurred. \n\n"
View Full Code Here

Examples of net.sf.jode.decompiler.Decompiler

  public ByteCodeEngineSource decompile() throws IOException
  {
    final Map<String, String> classes = New.map();

    final ByteCodeEngineLocation location = new ByteCodeEngineLocation( this.engine );
    final Decompiler decompiler = new Decompiler();
    decompiler.setOption( "style", "sun" );
    decompiler.setOption( "tabwidth", "100" );
    decompiler.setOption( "indent", "4" );
    final ByteCodeEngineLocation engineLocation = location;

    decompiler.setClassPath( new ClassPath( new ClassPath.Location[] { engineLocation,
        ClassPath.createLocation( "reflection:" ) } ) );

    for (String className : this.engine.getClassNamesAndBytes().keySet()) {
      final StringWriter writer = new StringWriter();
      decompiler.decompile( className, writer, null );
      final String source = stripHeaderCommentFrom( writer.toString() );
      classes.put( className, source );
    }

    return new ByteCodeEngineSourceImpl( classes );
View Full Code Here

Examples of org.jreversepro.decompile.Decompiler

  }

  public void processMethod(Method method) {
    DecompilationContext ctx = new DecompilationContext(method, clazz
        .getConstantPool());
    Decompiler decompiler = new Decompiler(ctx);
    Block block = decompiler.extractAST();
    SourceEmitter emitter = SourceEmitterFactory
        .getSourceEmitter(JLSSource.JDK14);
    outputString(emitter.emitCode(block));

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.