Java / Kotlin 디 컴파일 도구 및 AST 라이브러리.
이 라이브러리의 주요 목표는 모든 지침에 대한 노드를 포함한 Java 클래스 파일에 대한 완전한 추상 소스 트리 (AST)를 구성하는 것이 었습니다. ASM의 상단으로 제작되었으며 메소드에 대한 AST 요소가 있지만 여기에서 중지하고 간단한 Opcode 목록을 제공합니다.
소스 및 재구성에 유용하지는 않지만 Java 클래스 파일이 채우기 ast는 오크 코드 레벨이 아닌 문에서 패턴을 검색하려는 코드 분석에 매우 유용합니다.
지원 및 토론은 #Decompiler 채널의 IRC.esper.net의 개발/지원 채팅을 참조하십시오.
현재 Kotlin 지원은 매우 새롭고 모든 기능이 지원되지 않으며 출력의 버그가 예상됩니다.
java -jar Despector.jar <--config=[path]> <--lang=[java|kotlin]> [sources...] [destination]
--config= 사용하면 특정 해제 설정에 대한 구성 파일을 정의 할 수 있습니다.--lang= 는 출력이 특정 언어로되도록 강요합니다. 정상적인 행동은 내용에서 클래스 파일 소스 언어를 결정하는 것입니다.이 디 컴파일러는 여전히 큰 발전을 받고 있으며 문제가 발생할 것입니다. 잘못된 출력이 발생하면 문제 추적기에서 문제를 열어주십시오. 최소한 예상 및 발생한 출력이 포함됩니다. 문제를 보여주는 편집 된 클래스도 유용하게 도움이 될 것입니다.
기능 요청은 항상 환영하며 최대한 많은 정보를 제공하는 문제 추적기에서 이루어질 수 있습니다.
다음은 샘플 구성 파일입니다. 선택 사항이지만 서식과 같은 통합 설정을 제어 할 수 있습니다. 더 많은 설정을 원한다면 이슈 트래커에서 기능 요청이 열립니다. 구성 파일은 Hocon 구성 형식을 사용합니다.
# Despector decompiler configuration:
# Cleanup configuration
cleanup {
# Cleanup operations to apply before emitting
operations=[]
}
# Targeted cleanup operations
"cleanup_sections"=[]
# Emitter configuration
emitter {
# Whether to emit synthetic members
emit-synthetics=false
# The path of the formatter configuration
formatting-path="run/eclipse_formatter.xml"
# One of: eclipse,intellij
formatting-type=eclipse
# The path of the import order configuration
import-order-path="run/eclipse.importorder"
}
# Kotlin specific configuration
kotlin {
# Whether to replace strings containing new lines with raw strings
replace-multiline-strings=true
}
# Prints out opcodes of a method when it fails to decompile.
print-opcodes-on-error=true