¿Qué es un descompilador?

3136 vistas

Un descompilador es una utilidad que permite recuperar el código fuente de una clase o de un conjunto de clases a partir de un byte code. Un ejemplo es Javap, disponible en el SDK.



java
  1. E:\>javap java.lang.Object
  2. Compiled from "Object.java"
  3. public class java.lang.Object{
  4.     public native int hashCode();
  5.     static {};
  6.     public java.lang.Object();
  7.     protected void finalize();
  8.       throws java/lang/Throwable
  9.     public final native void notify();
  10.     public final native void notifyAll();
  11.     public final void wait();
  12.       throws java/lang/InterruptedException
  13.     public final native void wait(long);
  14.       throws java/lang/InterruptedException
  15.     public final void wait(long,int);
  16.       throws java/lang/InterruptedException
  17.     public final native java.lang.Class getClass();
  18.     protected native java.lang.Object clone();
  19.       throws java/lang/CloneNotSupportedException
  20.     public boolean equals(java.lang.Object);
  21.     public java.lang.String toString();
  22. }



Para más información para el comando javap:



java
  1. javap -help