Package net.sf.jode.decompiler

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

TOP

Related Classes of net.sf.jode.decompiler.Decompiler

Copyright © 2018 www.massapicom. 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.