Showing preview only (2,420K chars total). Download the full file or copy to clipboard to get everything.
Repository: DexPatcher/dex2jar
Branch: 2.x
Commit: d7a86110baba
Files: 403
Total size: 2.2 MB
Directory structure:
gitextract__96gfnvm/
├── .hgignore
├── .hgtags
├── .travis.yml
├── LICENSE.txt
├── NOTICE.txt
├── README.md
├── build.gradle
├── d2j-base-cmd/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── googlecode/
│ └── dex2jar/
│ └── tools/
│ └── BaseCmd.java
├── d2j-j6/
│ ├── README.md
│ ├── build.gradle
│ ├── j6-weave.txt
│ ├── jarjar-rules.txt
│ ├── proguard.txt
│ └── src/
│ └── main/
│ └── java/
│ ├── j6/
│ │ ├── Files.java
│ │ └── Thro.java
│ └── pxb/
│ └── java/
│ └── nio/
│ ├── charset/
│ │ └── StandardCharsets.java
│ └── file/
│ ├── CopyOption.java
│ ├── FileSystem.java
│ ├── FileVisitResult.java
│ ├── FileVisitor.java
│ ├── Files.java
│ ├── LinkOption.java
│ ├── OpenOption.java
│ ├── Path.java
│ ├── SimpleFileVisitor.java
│ ├── attribute/
│ │ ├── BasicFileAttributes.java
│ │ └── FileAttribute.java
│ └── spi/
│ └── FileSystemProvider.java
├── d2j-jasmin/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ ├── antlr3/
│ │ │ └── com/
│ │ │ └── googlecode/
│ │ │ └── d2j/
│ │ │ └── jasmin/
│ │ │ └── Jasmin.g
│ │ └── java/
│ │ └── com/
│ │ └── googlecode/
│ │ └── d2j/
│ │ └── jasmin/
│ │ ├── Jar2JasminCmd.java
│ │ ├── Jasmin2JarCmd.java
│ │ ├── JasminDumper.java
│ │ └── Jasmins.java
│ └── test/
│ ├── java/
│ │ └── com/
│ │ └── googlecode/
│ │ └── d2j/
│ │ └── tools/
│ │ └── jar/
│ │ └── test/
│ │ └── Jasmin2jTest.java
│ └── resources/
│ └── jasmins/
│ └── type.j
├── d2j-smali/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ ├── antlr4/
│ │ │ └── com/
│ │ │ └── googlecode/
│ │ │ └── d2j/
│ │ │ └── smali/
│ │ │ └── antlr4/
│ │ │ └── Smali.g4
│ │ └── java/
│ │ └── com/
│ │ └── googlecode/
│ │ └── d2j/
│ │ └── smali/
│ │ ├── AntlrSmaliUtil.java
│ │ ├── Baksmali.java
│ │ ├── BaksmaliCmd.java
│ │ ├── BaksmaliCodeDumper.java
│ │ ├── BaksmaliDexFileVisitor.java
│ │ ├── BaksmaliDumpOut.java
│ │ ├── BaksmaliDumper.java
│ │ ├── Smali.java
│ │ ├── SmaliCmd.java
│ │ ├── SmaliCodeVisitor.java
│ │ └── Utils.java
│ └── test/
│ ├── java/
│ │ └── a/
│ │ ├── BaksmaliTest.java
│ │ └── SmaliTest.java
│ └── resources/
│ └── a.smali
├── dex-ir/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── googlecode/
│ │ └── dex2jar/
│ │ └── ir/
│ │ ├── ET.java
│ │ ├── IrMethod.java
│ │ ├── LabelAndLocalMapper.java
│ │ ├── LocalVar.java
│ │ ├── StmtSearcher.java
│ │ ├── StmtTraveler.java
│ │ ├── TransformerException.java
│ │ ├── Trap.java
│ │ ├── TypeClass.java
│ │ ├── Util.java
│ │ ├── expr/
│ │ │ ├── AbstractInvokeExpr.java
│ │ │ ├── ArrayExpr.java
│ │ │ ├── BinopExpr.java
│ │ │ ├── CastExpr.java
│ │ │ ├── Constant.java
│ │ │ ├── Exprs.java
│ │ │ ├── FieldExpr.java
│ │ │ ├── FilledArrayExpr.java
│ │ │ ├── InvokeCustomExpr.java
│ │ │ ├── InvokeExpr.java
│ │ │ ├── InvokePolymorphicExpr.java
│ │ │ ├── Local.java
│ │ │ ├── NewExpr.java
│ │ │ ├── NewMutiArrayExpr.java
│ │ │ ├── PhiExpr.java
│ │ │ ├── RefExpr.java
│ │ │ ├── StaticFieldExpr.java
│ │ │ ├── TypeExpr.java
│ │ │ ├── UnopExpr.java
│ │ │ └── Value.java
│ │ ├── stmt/
│ │ │ ├── AssignStmt.java
│ │ │ ├── BaseSwitchStmt.java
│ │ │ ├── GotoStmt.java
│ │ │ ├── IfStmt.java
│ │ │ ├── JumpStmt.java
│ │ │ ├── LabelStmt.java
│ │ │ ├── LookupSwitchStmt.java
│ │ │ ├── NopStmt.java
│ │ │ ├── ReturnVoidStmt.java
│ │ │ ├── Stmt.java
│ │ │ ├── StmtList.java
│ │ │ ├── Stmts.java
│ │ │ ├── TableSwitchStmt.java
│ │ │ ├── UnopStmt.java
│ │ │ └── VoidInvokeStmt.java
│ │ └── ts/
│ │ ├── AggTransformer.java
│ │ ├── Cfg.java
│ │ ├── CleanLabel.java
│ │ ├── ConstTransformer.java
│ │ ├── DeadCodeTransformer.java
│ │ ├── EndRemover.java
│ │ ├── ExceptionHandlerTrim.java
│ │ ├── FixVar.java
│ │ ├── Ir2JRegAssignTransformer.java
│ │ ├── JimpleTransformer.java
│ │ ├── MultiArrayTransformer.java
│ │ ├── NewTransformer.java
│ │ ├── NpeTransformer.java
│ │ ├── RemoveConstantFromSSA.java
│ │ ├── RemoveLocalFromSSA.java
│ │ ├── SSATransformer.java
│ │ ├── StatedTransformer.java
│ │ ├── Transformer.java
│ │ ├── TypeTransformer.java
│ │ ├── UnSSATransformer.java
│ │ ├── UniqueQueue.java
│ │ ├── VoidInvokeTransformer.java
│ │ ├── ZeroTransformer.java
│ │ ├── an/
│ │ │ ├── AnalyzeValue.java
│ │ │ ├── BaseAnalyze.java
│ │ │ ├── SimpleLiveAnalyze.java
│ │ │ └── SimpleLiveValue.java
│ │ └── array/
│ │ ├── ArrayElementTransformer.java
│ │ ├── ArrayNullPointerTransformer.java
│ │ └── FillArrayTransformer.java
│ └── test/
│ └── java/
│ └── com/
│ └── googlecode/
│ └── dex2jar/
│ └── ir/
│ └── test/
│ ├── AggTransformerTest.java
│ ├── BaseTransformerTest.java
│ ├── ConstTransformerTest.java
│ ├── ConstantStringTest.java
│ ├── DeadCodeTrnasformerTest.java
│ ├── JimpleTransformerTest.java
│ ├── RemoveConstantFromSSATest.java
│ ├── RemoveLocalFromSSATest.java
│ ├── SSATransformerTest.java
│ ├── StmtListTest.java
│ ├── TypeTransformerTest.java
│ ├── UnSSATransformerTransformerTest.java
│ └── ZeroTransformerTest.java
├── dex-reader/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── googlecode/
│ │ └── d2j/
│ │ ├── reader/
│ │ │ ├── BaseDexFileReader.java
│ │ │ ├── DexFileReader.java
│ │ │ ├── MultiDexFileReader.java
│ │ │ └── zip/
│ │ │ └── ZipUtil.java
│ │ └── util/
│ │ ├── ASMifierAnnotationV.java
│ │ ├── ASMifierClassV.java
│ │ ├── ASMifierCodeV.java
│ │ ├── ASMifierFileV.java
│ │ ├── ArrayOut.java
│ │ ├── Escape.java
│ │ ├── Mutf8.java
│ │ ├── Out.java
│ │ ├── Utf8Utils.java
│ │ └── zip/
│ │ ├── AccessBufByteArrayOutputStream.java
│ │ ├── AutoSTOREDZipOutputStream.java
│ │ ├── ZipConstants.java
│ │ ├── ZipEntry.java
│ │ └── ZipFile.java
│ └── test/
│ ├── java/
│ │ └── com/
│ │ └── googlecode/
│ │ └── d2j/
│ │ └── reader/
│ │ └── test/
│ │ ├── AsmfierTest.java
│ │ ├── BadZipEntryFlagTest.java
│ │ └── SkipDupMethod.java
│ └── resources/
│ └── i200.dex
├── dex-reader-api/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── googlecode/
│ └── d2j/
│ ├── DexConstants.java
│ ├── DexException.java
│ ├── DexLabel.java
│ ├── DexType.java
│ ├── Field.java
│ ├── Method.java
│ ├── MethodHandle.java
│ ├── Proto.java
│ ├── Visibility.java
│ ├── node/
│ │ ├── DexAnnotationNode.java
│ │ ├── DexClassNode.java
│ │ ├── DexCodeNode.java
│ │ ├── DexDebugNode.java
│ │ ├── DexFieldNode.java
│ │ ├── DexFileNode.java
│ │ ├── DexMethodNode.java
│ │ ├── TryCatchNode.java
│ │ ├── analysis/
│ │ │ ├── DvmFrame.java
│ │ │ └── DvmInterpreter.java
│ │ └── insn/
│ │ ├── AbstractMethodStmtNode.java
│ │ ├── BaseSwitchStmtNode.java
│ │ ├── ConstStmtNode.java
│ │ ├── DexLabelStmtNode.java
│ │ ├── DexStmtNode.java
│ │ ├── FieldStmtNode.java
│ │ ├── FillArrayDataStmtNode.java
│ │ ├── FilledNewArrayStmtNode.java
│ │ ├── JumpStmtNode.java
│ │ ├── MethodCustomStmtNode.java
│ │ ├── MethodPolymorphicStmtNode.java
│ │ ├── MethodStmtNode.java
│ │ ├── PackedSwitchStmtNode.java
│ │ ├── SparseSwitchStmtNode.java
│ │ ├── Stmt0RNode.java
│ │ ├── Stmt1RNode.java
│ │ ├── Stmt2R1NNode.java
│ │ ├── Stmt2RNode.java
│ │ ├── Stmt3RNode.java
│ │ └── TypeStmtNode.java
│ ├── reader/
│ │ ├── CFG.java
│ │ ├── InstructionFormat.java
│ │ ├── InstructionIndexType.java
│ │ └── Op.java
│ └── visitors/
│ ├── DexAnnotationAble.java
│ ├── DexAnnotationVisitor.java
│ ├── DexClassVisitor.java
│ ├── DexCodeVisitor.java
│ ├── DexDebugVisitor.java
│ ├── DexFieldVisitor.java
│ ├── DexFileVisitor.java
│ └── DexMethodVisitor.java
├── dex-tools/
│ ├── build.gradle
│ ├── open-source-license.txt
│ └── src/
│ ├── main/
│ │ ├── assemble/
│ │ │ └── package.xml
│ │ ├── bin_gen/
│ │ │ ├── bat_template
│ │ │ ├── class.cfg
│ │ │ ├── d2j_invoke.bat
│ │ │ ├── d2j_invoke.sh
│ │ │ └── sh_template
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── googlecode/
│ │ │ ├── d2j/
│ │ │ │ ├── signapk/
│ │ │ │ │ ├── AbstractJarSign.java
│ │ │ │ │ ├── Base64.java
│ │ │ │ │ ├── SunJarSignImpl.java
│ │ │ │ │ └── TinySignImpl.java
│ │ │ │ ├── tools/
│ │ │ │ │ └── jar/
│ │ │ │ │ ├── BaseWeaver.java
│ │ │ │ │ ├── ClassInfo.java
│ │ │ │ │ ├── DexWeaver.java
│ │ │ │ │ ├── InitOut.java
│ │ │ │ │ ├── InvocationWeaver.java
│ │ │ │ │ ├── ScanBridgeAdapter.java
│ │ │ │ │ └── WebApp.java
│ │ │ │ └── util/
│ │ │ │ └── AccUtils.java
│ │ │ └── dex2jar/
│ │ │ ├── bin_gen/
│ │ │ │ └── BinGen.java
│ │ │ └── tools/
│ │ │ ├── ApkSign.java
│ │ │ ├── AsmVerify.java
│ │ │ ├── BaksmaliBaseDexExceptionHandler.java
│ │ │ ├── ClassVersionSwitch.java
│ │ │ ├── DeObfInitCmd.java
│ │ │ ├── DecryptStringCmd.java
│ │ │ ├── Dex2jarCmd.java
│ │ │ ├── Dex2jarMultiThreadCmd.java
│ │ │ ├── DexRecomputeChecksum.java
│ │ │ ├── DexWeaverCmd.java
│ │ │ ├── ExtractOdexFromCoredumpCmd.java
│ │ │ ├── GenerateCompileStubFromOdex.java
│ │ │ ├── Jar2Dex.java
│ │ │ ├── JarAccessCmd.java
│ │ │ ├── JarWeaverCmd.java
│ │ │ ├── StdApkCmd.java
│ │ │ └── to/
│ │ │ └── Do.java
│ │ └── resources/
│ │ └── com/
│ │ └── googlecode/
│ │ └── dex2jar/
│ │ └── tools/
│ │ ├── ApkSign.cer
│ │ └── ApkSign.private
│ └── test/
│ ├── java/
│ │ └── com/
│ │ └── googlecode/
│ │ └── d2j/
│ │ └── tools/
│ │ └── jar/
│ │ ├── MethodInvocation.java
│ │ └── test/
│ │ ├── DexWaveTest.java
│ │ └── WaveTest.java
│ └── resources/
│ └── weave/
│ ├── a-after.j
│ ├── a-before.j
│ ├── a-gen.j
│ ├── b-after.j
│ ├── b-before.j
│ ├── b-gen.j
│ ├── c-after.j
│ ├── c-before.j
│ ├── c-gen.j
│ └── smali/
│ ├── a-after.smali
│ ├── a-before.smali
│ ├── a-gen.smali
│ ├── b-after.smali
│ ├── b-before.smali
│ └── b-gen.smali
├── dex-translator/
│ ├── build.gradle
│ ├── libs/
│ │ └── dx-27.0.3.jar
│ └── src/
│ ├── main/
│ │ └── java/
│ │ ├── com/
│ │ │ └── googlecode/
│ │ │ └── d2j/
│ │ │ ├── asm/
│ │ │ │ └── LdcOptimizeAdapter.java
│ │ │ ├── converter/
│ │ │ │ ├── Dex2IRConverter.java
│ │ │ │ ├── IR2JConverter.java
│ │ │ │ └── J2IRConverter.java
│ │ │ ├── dex/
│ │ │ │ ├── BaseDexExceptionHandler.java
│ │ │ │ ├── ClassVisitorFactory.java
│ │ │ │ ├── Dex2Asm.java
│ │ │ │ ├── Dex2IrAdapter.java
│ │ │ │ ├── Dex2jar.java
│ │ │ │ ├── DexExceptionHandler.java
│ │ │ │ ├── DexFix.java
│ │ │ │ ├── ExDex2Asm.java
│ │ │ │ ├── LambadaNameSafeClassAdapter.java
│ │ │ │ └── V3.java
│ │ │ └── util/
│ │ │ └── Types.java
│ │ └── org/
│ │ └── objectweb/
│ │ └── asm/
│ │ └── AsmBridge.java
│ └── test/
│ ├── java/
│ │ ├── com/
│ │ │ └── googlecode/
│ │ │ └── dex2jar/
│ │ │ └── test/
│ │ │ ├── ASMifierTest.java
│ │ │ ├── ArrayTypeTest.java
│ │ │ ├── AutoCastTest.java
│ │ │ ├── D2jTest.java
│ │ │ ├── DexTranslatorRunner.java
│ │ │ ├── EmptyTrapTest.java
│ │ │ ├── I101Test.java
│ │ │ ├── I121Test.java
│ │ │ ├── I168Test.java
│ │ │ ├── I63Test.java
│ │ │ ├── Issue71Test.java
│ │ │ ├── OptSyncTest.java
│ │ │ ├── ResTest.java
│ │ │ ├── Smali2jTest.java
│ │ │ ├── TestDexClassV.java
│ │ │ ├── TestUtils.java
│ │ │ └── ZeroTest.java
│ │ ├── dex2jar/
│ │ │ └── gen/
│ │ │ └── FTPClient__parsePassiveModeReply.java
│ │ └── res/
│ │ ├── ArrayRes.java
│ │ ├── ChineseRes.java
│ │ ├── ConstValues.java
│ │ ├── ExceptionRes.java
│ │ ├── Gh28Type.java
│ │ ├── I142_annotation_default.java
│ │ ├── I56_AccessFlag.java
│ │ ├── I71.java
│ │ ├── I73.java
│ │ ├── I88.java
│ │ ├── LongDoubleRes.java
│ │ ├── NoEndRes.java
│ │ ├── NullZero.java
│ │ ├── OptimizeSynchronized.java
│ │ ├── PopRes.java
│ │ ├── ResChild.java
│ │ ├── ResParent.java
│ │ ├── SwitchRes.java
│ │ ├── U0000String.java
│ │ ├── WideRes.java
│ │ └── i55/
│ │ ├── AAbstractClass.java
│ │ ├── AClass.java
│ │ └── AInterface.java
│ └── resources/
│ ├── dexes/
│ │ └── i_jetty.dex
│ └── smalis/
│ ├── 0zs.smali
│ ├── ML.smali
│ ├── bb-1-can-not-merge-z-and-i.smali
│ ├── bb-5-ArrayIndexOutOfBoundsOnType.smali
│ ├── empty-try-catch-with-goto-head.smali
│ ├── gh-issue-186.smali
│ ├── gh-issue-4.smali
│ ├── goto-first-label.smali
│ ├── i230.smali
│ ├── int-or-boolean.smali
│ ├── issue-220-219-uninit-reg.smali
│ ├── loop-enclosing-class.smali
│ ├── mayfail-method-code-too-large.smali
│ ├── negative-array-size.smali
│ ├── npe-cause-trap-fail.smali
│ ├── opt-lock.smali
│ ├── useless-new.smali
│ └── writeString.smali
├── dex-writer/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── googlecode/
│ │ └── d2j/
│ │ └── dex/
│ │ └── writer/
│ │ ├── AnnotationWriter.java
│ │ ├── CantNotFixContentException.java
│ │ ├── ClassWriter.java
│ │ ├── CodeWriter.java
│ │ ├── DexFileWriter.java
│ │ ├── DexWriteException.java
│ │ ├── FieldWriter.java
│ │ ├── MethodWriter.java
│ │ ├── ann/
│ │ │ ├── Alignment.java
│ │ │ ├── Idx.java
│ │ │ └── Off.java
│ │ ├── ev/
│ │ │ ├── EncodedAnnotation.java
│ │ │ ├── EncodedArray.java
│ │ │ └── EncodedValue.java
│ │ ├── insn/
│ │ │ ├── Insn.java
│ │ │ ├── JumpOp.java
│ │ │ ├── Label.java
│ │ │ ├── OpInsn.java
│ │ │ └── PreBuildInsn.java
│ │ ├── io/
│ │ │ ├── ByteBufferOut.java
│ │ │ └── DataOut.java
│ │ └── item/
│ │ ├── AnnotationItem.java
│ │ ├── AnnotationSetItem.java
│ │ ├── AnnotationSetRefListItem.java
│ │ ├── AnnotationsDirectoryItem.java
│ │ ├── BaseItem.java
│ │ ├── ClassDataItem.java
│ │ ├── ClassDefItem.java
│ │ ├── CodeItem.java
│ │ ├── ConstPool.java
│ │ ├── DebugInfoItem.java
│ │ ├── EncodedArrayItem.java
│ │ ├── FieldIdItem.java
│ │ ├── HeadItem.java
│ │ ├── MapListItem.java
│ │ ├── MethodIdItem.java
│ │ ├── ProtoIdItem.java
│ │ ├── SectionItem.java
│ │ ├── StringDataItem.java
│ │ ├── StringIdItem.java
│ │ ├── TypeIdItem.java
│ │ └── TypeListItem.java
│ └── test/
│ └── java/
│ └── a/
│ ├── AppWriterTest.java
│ └── CpStringTest.java
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
================================================
FILE CONTENTS
================================================
================================================
FILE: .hgignore
================================================
syntax: glob
*/target/*
target/*
*/build
build
*/.project
*/.classpath
*/.*
.*
*.bak
*.orig
*/nb-configuration.xml
*.iml
*.ipr
*.iws
*~
================================================
FILE: .hgtags
================================================
9361e645790f70de30f5ca05bff21f55ecddaddc 0.0.6
4713eec717a35774e6d34ac0819982d2bc34bdc5 0.0.7
6743b6bb8a38b17fe13ca54edec6727f76cd8ad3 0.0.7.1
5de91e5a0e9537e02fe47f044b23776757594d4e 0.0.7.2
98cb7e78cfaf68667f150cf7eefe671bad1ac5e7 0.0.7.3
f415c01ff9255523595e1675e63e4761cf5ec370 0.0.7.4
9605cc1f3139c57763040fd30281dcdc81cafb3d 0.0.7.5
45e1e724eee2e630e589896c55ac86d910e498e1 0.0.7.6
cb85fc62c81871c3054493b036094a8aeebd08d4 0.0.7.7
9bb7ad84eace90e5702592db47407a6eae8baa6e 0.0.7.8
================================================
FILE: .travis.yml
================================================
language: java
jdk:
- openjdk8
================================================
FILE: LICENSE.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: NOTICE.txt
================================================
dex2jar - Tools to work with android .dex and java .class files
Copyright (c) 2009-2014 Panxiaobo
contributors
- Bob Pan <pxb1988#gmail.com>
- Enea Stanzani <aeneas.ltr#gmail.com>
- t3stwhat <t3stwhat#gmail.com>
- paulhooijenga <paulhooijenga#gmail.com>
- yyjdelete <yyjdelete#gmail.com>
- jcmdev0 <jcmdev0#gmail.com>
================================================
FILE: README.md
================================================
**Project move to [SourceForge](https://sourceforge.net/p/dex2jar) and [Bitbucket](https://bitbucket.org/pxb1988/dex2jar) and [Github](https://github.com/pxb1988/dex2jar)**
| _ | Mirror | Wiki | Downloads | Issues |
|--:|:-----|:----:|:---------:|:------:|
| sf | https://sourceforge.net/p/dex2jar | [Wiki](https://sourceforge.net/p/dex2jar/wiki) | [Downloads](https://sourceforge.net/projects/dex2jar/files/) | [Tickets](https://sourceforge.net/p/dex2jar/tickets/) |
| bb | https://bitbucket.org/pxb1988/dex2jar | [Wiki](https://bitbucket.org/pxb1988/dex2jar/wiki) | [Downloads](https://bitbucket.org/pxb1988/dex2jar/downloads) | [Issues](https://bitbucket.org/pxb1988/dex2jar/issues) |
| gh | https://github.com/pxb1988/dex2jar | [Wiki](https://github.com/pxb1988/dex2jar/wiki) | [Releases](https://github.com/pxb1988/dex2jar/releases) | [Issues](https://github.com/pxb1988/dex2jar/issues) |
| gc | https://code.google.com/p/dex2jar | [old](http://code.google.com/p/dex2jar/w/list) | [old](http://code.google.com/p/dex2jar/downloads/list) | [old](http://code.google.com/p/dex2jar/issues/list)|
#dex2jar [](https://travis-ci.org/pxb1988/dex2jar)
Tools to work with android .dex and java .class files
1. dex-reader/writer:
Read/write the Dalvik Executable (.dex) file. It has a [light weight API similar with ASM](https://sourceforge.net/p/dex2jar/wiki/Faq#markdown-header-want-to-read-dex-file-using-dex2jar).
2. d2j-dex2jar:
Convert .dex file to .class files (zipped as jar)
3. smali/baksmali:
disassemble dex to smali files and assemble dex from smali files. different implementation to [smali/baksmali](http://code.google.com/p/smali), same syntax, but we support escape in type desc "Lcom/dex2jar\t\u1234;"
4. other tools:
[d2j-decrypt-string](https://sourceforge.net/p/dex2jar/wiki/DecryptStrings)
## Usage
> sh d2j-dex2jar.sh -f ~/path/to/apk_to_decompile.apk
And the output file will be `apk_to_decompile-dex2jar.jar`.
## Need help ?
send email to dex2jar@googlegroups.com
or post on issue trackers list above.
## License
[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
================================================
FILE: build.gradle
================================================
allprojects {
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'com.googlecode.d2j'
version = '2.1-SNAPSHOT'
}
defaultTasks('clean','distZip')
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
sourceCompatibility = 1.7
targetCompatibility = 1.7
task packageSources(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts.archives packageSources
repositories {
mavenCentral()
}
// == support provided scope
configurations {
provided
}
sourceSets {
main { compileClasspath += configurations.provided }
test {
compileClasspath += configurations.provided
}
}
// == end
[compileJava, compileTestJava]*.options.collect {options ->options.encoding = 'UTF-8'}
dependencies {
testCompile group: 'junit', name: 'junit', version:'4.11'
compile fileTree(dir: 'libs', include: '*.jar')
}
jar {
manifest {
attributes("Implementation-Title": project.name,
"Implementation-Version": project.version,
"Build-Time": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"Revision":"${getRevision()}",
"Build-Number": System.env.BUILD_NUMBER?System.env.BUILD_NUMBER:"-1",
)
}
from (project.parent.projectDir) {
include 'NOTICE.txt'
include 'LICENSE.txt'
into('META-INF')
}
}
}
def getRevision() {
if (System.env.BUILD_REVISION) {
return System.env.BUILD_REVISION
}
if (System.env.GIT_REVISION) {
return System.env.GIT_REVISION
}
if (System.env.MERCURIAL_REVISION) {
System.env.MERCURIAL_REVISION
}
def ver = null;
try {
ver = 'git rev-parse --short HEAD'.execute().text.trim()
} catch (e) {
// ignore
}
if (!ver) {
try {
ver = 'hg id -i -b -t'.execute().text.split(' ')[0];
} catch (e) {
// ignore
}
}
if (!ver) {
ver = "HEAD"
}
return ver
}
================================================
FILE: d2j-base-cmd/build.gradle
================================================
description = 'a simple cmd parser'
dependencies {
}
================================================
FILE: d2j-base-cmd/src/main/java/com/googlecode/dex2jar/tools/BaseCmd.java
================================================
/*
* dex2jar - Tools to work with android .dex and java .class files
* Copyright (c) 2009-2012 Panxiaobo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.googlecode.dex2jar.tools;
import java.io.File;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.charset.StandardCharsets;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.spi.FileSystemProvider;
import java.util.*;
public abstract class BaseCmd {
public static String getBaseName(String fn) {
int x = fn.lastIndexOf('.');
return x >= 0 ? fn.substring(0, x) : fn;
}
public static String getBaseName(Path fn) {
return getBaseName(fn.getFileName().toString());
}
public interface FileVisitorX {
// change the relative from Path to String
// java.nio.file.ProviderMismatchException on jdk8
void visitFile(Path file, String relative) throws IOException;
}
public static void walkFileTreeX(final Path base, final FileVisitorX fv) throws IOException {
Files.walkFileTree(base, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
fv.visitFile(file, base.relativize(file).toString());
return super.visitFile(file, attrs);
}
});
}
public static void walkJarOrDir(final Path in, final FileVisitorX fv) throws IOException {
if (Files.isDirectory(in)) {
walkFileTreeX(in, fv);
} else {
try (FileSystem inputFileSystem = openZip(in)) {
walkFileTreeX(inputFileSystem.getPath("/"), fv);
}
}
}
public static void createParentDirectories(Path p) throws IOException {
// merge patch from t3stwhat, fix crash on save to windows path like 'C:\\abc.jar'
Path parent = p.getParent();
if (parent != null && !Files.exists(parent)) {
Files.createDirectories(parent);
}
}
public static FileSystem createZip(Path output) throws IOException {
Map<String, Object> env = new HashMap<>();
env.put("create", "true");
Files.deleteIfExists(output);
createParentDirectories(output);
for (FileSystemProvider p : FileSystemProvider.installedProviders()) {
String s = p.getScheme();
if ("jar".equals(s) || "zip".equalsIgnoreCase(s)) {
return p.newFileSystem(output, env);
}
}
throw new IOException("cant find zipfs support");
}
public static FileSystem openZip(Path in) throws IOException {
for (FileSystemProvider p : FileSystemProvider.installedProviders()) {
String s = p.getScheme();
if ("jar".equals(s) || "zip".equalsIgnoreCase(s)) {
return p.newFileSystem(in, new HashMap<String, Object>());
}
}
throw new IOException("cant find zipfs support");
}
@SuppressWarnings("serial")
protected static class HelpException extends RuntimeException {
public HelpException() {
super();
}
public HelpException(String message) {
super(message);
}
}
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.FIELD })
static public @interface Opt {
String argName() default "";
String description() default "";
boolean hasArg() default true;
String longOpt() default "";
String opt() default "";
boolean required() default false;
}
static protected class Option implements Comparable<Option> {
public String argName = "arg";
public String description;
public Field field;
public boolean hasArg = true;
public String longOpt;
public String opt;
public boolean required = false;
@Override
public int compareTo(Option o) {
int result = s(this.opt, o.opt);
if (result == 0) {
result = s(this.longOpt, o.longOpt);
if (result == 0) {
result = s(this.argName, o.argName);
if (result == 0) {
result = s(this.description, o.description);
}
}
}
return result;
}
private static int s(String a, String b) {
if (a != null && b != null) {
return a.compareTo(b);
} else if (a != null) {
return 1;
} else if (b != null) {
return -1;
} else {
return 0;
}
}
public String getOptAndLongOpt() {
StringBuilder sb = new StringBuilder();
boolean havePrev = false;
if (opt != null && opt.length() > 0) {
sb.append("-").append(opt);
havePrev = true;
}
if (longOpt != null && longOpt.length() > 0) {
if (havePrev) {
sb.append(",");
}
sb.append("--").append(longOpt);
}
return sb.toString();
}
}
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE })
static public @interface Syntax {
String cmd();
String desc() default "";
String onlineHelp() default "";
String syntax() default "";
}
private String cmdLineSyntax;
private String cmdName;
private String desc;
private String onlineHelp;
protected Map<String, Option> optMap = new HashMap<String, Option>();
@Opt(opt = "h", longOpt = "help", hasArg = false, description = "Print this help message")
private boolean printHelp = false;
protected String remainingArgs[];
protected String orginalArgs[];
public BaseCmd() {
}
public BaseCmd(String cmdLineSyntax, String header) {
super();
int i = cmdLineSyntax.indexOf(' ');
if (i > 0) {
this.cmdName = cmdLineSyntax.substring(0, i);
this.cmdLineSyntax = cmdLineSyntax.substring(i + 1);
}
this.desc = header;
}
public BaseCmd(String cmdName, String cmdSyntax, String header) {
super();
this.cmdName = cmdName;
this.cmdLineSyntax = cmdSyntax;
this.desc = header;
}
private Set<Option> collectRequriedOptions(Map<String, Option> optMap) {
Set<Option> options = new HashSet<Option>();
for (Map.Entry<String, Option> e : optMap.entrySet()) {
Option option = e.getValue();
if (option.required) {
options.add(option);
}
}
return options;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
protected Object convert(String value, Class type) {
if (type.equals(String.class)) {
return value;
}
if (type.equals(int.class) || type.equals(Integer.class)) {
return Integer.parseInt(value);
}
if (type.equals(long.class) || type.equals(Long.class)) {
return Long.parseLong(value);
}
if (type.equals(float.class) || type.equals(Float.class)) {
return Float.parseFloat(value);
}
if (type.equals(double.class) || type.equals(Double.class)) {
return Double.parseDouble(value);
}
if (type.equals(boolean.class) || type.equals(Boolean.class)) {
return Boolean.parseBoolean(value);
}
if (type.equals(File.class)) {
return new File(value);
}
if (type.equals(Path.class)) {
return new File(value).toPath();
}
try {
type.asSubclass(Enum.class);
return Enum.valueOf(type, value);
} catch (Exception e) {
}
throw new RuntimeException("can't convert [" + value + "] to type " + type);
}
;
protected abstract void doCommandLine() throws Exception;
public void doMain(String... args) {
try {
initOptions();
parseSetArgs(args);
doCommandLine();
} catch (HelpException e) {
String msg = e.getMessage();
if (msg != null && msg.length() > 0) {
System.err.println("ERROR: " + msg);
}
usage();
} catch (Exception e) {
e.printStackTrace(System.err);
}
}
protected String getVersionString() {
return getClass().getPackage().getImplementationVersion();
}
protected void initOptionFromClass(Class<?> clz) {
if (clz == null) {
return;
} else {
initOptionFromClass(clz.getSuperclass());
}
Syntax syntax = clz.getAnnotation(Syntax.class);
if (syntax != null) {
this.cmdLineSyntax = syntax.syntax();
this.cmdName = syntax.cmd();
this.desc = syntax.desc();
this.onlineHelp = syntax.onlineHelp();
}
Field[] fs = clz.getDeclaredFields();
for (Field f : fs) {
Opt opt = f.getAnnotation(Opt.class);
if (opt != null) {
f.setAccessible(true);
Option option = new Option();
option.field = f;
option.description = opt.description();
option.hasArg = opt.hasArg();
option.required = opt.required();
if ("".equals(opt.longOpt()) && "".equals(opt.opt())) { // into automode
option.longOpt = fromCamel(f.getName());
if (f.getType().equals(boolean.class)) {
option.hasArg=false;
try {
if (f.getBoolean(this)) {
throw new RuntimeException("the value of " + f + " must be false, as it is declared as no args");
}
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
checkConflict(option, "--" + option.longOpt);
continue;
}
if (!opt.hasArg()) {
if (!f.getType().equals(boolean.class)) {
throw new RuntimeException("the type of " + f
+ " must be boolean, as it is declared as no args");
}
try {
if (f.getBoolean(this)) {
throw new RuntimeException("the value of " + f + " must be false, as it is declared as no args");
}
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
boolean haveLongOpt = false;
if (!"".equals(opt.longOpt())) {
option.longOpt = opt.longOpt();
checkConflict(option, "--" + option.longOpt);
haveLongOpt = true;
}
if (!"".equals(opt.argName())) {
option.argName = opt.argName();
}
if (!"".equals(opt.opt())) {
option.opt = opt.opt();
checkConflict(option, "-" + option.opt);
} else {
if (!haveLongOpt) {
throw new RuntimeException("opt or longOpt is not set in @Opt(...) " + f);
}
}
}
}
}
private static String fromCamel(String name) {
if (name.length() == 0) {
return "";
}
StringBuilder sb = new StringBuilder();
char[] charArray = name.toCharArray();
sb.append(Character.toLowerCase(charArray[0]));
for (int i = 1; i < charArray.length; i++) {
char c = charArray[i];
if (Character.isUpperCase(c)) {
sb.append("-").append(Character.toLowerCase(c));
} else {
sb.append(c);
}
}
return sb.toString();
}
private void checkConflict(Option option, String key) {
if (optMap.containsKey(key)) {
Option preOption = optMap.get(key);
throw new RuntimeException(String.format("[@Opt(...) %s] conflict with [@Opt(...) %s]",
preOption.field.toString(), option.field
));
}
optMap.put(key, option);
}
protected void initOptions() {
initOptionFromClass(this.getClass());
}
public static void main(String... args) throws Exception {
if (args.length < 1) {
System.err.println("d2j-run <class> [args]");
return;
}
Class<?> clz = Class.forName(args[0]);
String newArgs[] = new String[args.length - 1];
System.arraycopy(args, 1, newArgs, 0, newArgs.length);
if (BaseCmd.class.isAssignableFrom(clz)) {
BaseCmd baseCmd = (BaseCmd) clz.newInstance();
baseCmd.doMain(newArgs);
} else {
Method m = clz.getMethod("main",String[].class);
m.setAccessible(true);
m.invoke(null, (Object)newArgs);
}
}
protected void parseSetArgs(String... args) throws IllegalArgumentException, IllegalAccessException {
this.orginalArgs = args;
List<String> remainsOptions = new ArrayList<String>();
Set<Option> requiredOpts = collectRequriedOptions(optMap);
Option needArgOpt = null;
for (String s : args) {
if (needArgOpt != null) {
needArgOpt.field.set(this, convert(s, needArgOpt.field.getType()));
needArgOpt = null;
} else if (s.startsWith("-")) {// its a short or long option
Option opt = optMap.get(s);
requiredOpts.remove(opt);
if (opt == null) {
System.err.println("ERROR: Unrecognized option: " + s);
throw new HelpException();
} else {
if (opt.hasArg) {
needArgOpt = opt;
} else {
opt.field.set(this, true);
}
}
} else {
remainsOptions.add(s);
}
}
if (needArgOpt != null) {
System.err.println("ERROR: Option " + needArgOpt.getOptAndLongOpt() + " need an argument value");
throw new HelpException();
}
this.remainingArgs = remainsOptions.toArray(new String[remainsOptions.size()]);
if (this.printHelp) {
throw new HelpException();
}
if (!requiredOpts.isEmpty()) {
StringBuilder sb = new StringBuilder();
sb.append("ERROR: Options: ");
boolean first = true;
for (Option option : requiredOpts) {
if (first) {
first = false;
} else {
sb.append(" and ");
}
sb.append(option.getOptAndLongOpt());
}
sb.append(" is required");
System.err.println(sb.toString());
throw new HelpException();
}
}
protected void usage() {
PrintWriter out = new PrintWriter(new OutputStreamWriter(System.err, StandardCharsets.UTF_8), true);
final int maxLength = 80;
final int maxPaLength = 40;
out.println(this.cmdName + " -- " + desc);
out.println("usage: " + this.cmdName + " " + cmdLineSyntax);
if (this.optMap.size() > 0) {
out.println("options:");
}
// [PART.A.........][Part.B
// .-a,--aa.<arg>...desc1
// .................desc2
// .-b,--bb
TreeSet<Option> options = new TreeSet<Option>(this.optMap.values());
int palength = -1;
for (Option option : options) {
int pa = 4 + option.getOptAndLongOpt().length();
if (option.hasArg) {
pa += 3 + option.argName.length();
}
if (pa < maxPaLength) {
if (pa > palength) {
palength = pa;
}
}
}
int pblength = maxLength - palength;
StringBuilder sb = new StringBuilder();
for (Option option : options) {
sb.setLength(0);
sb.append(" ").append(option.getOptAndLongOpt());
if (option.hasArg) {
sb.append(" <").append(option.argName).append(">");
}
String desc = option.description;
if (desc == null || desc.length() == 0) {// no description
out.println(sb);
} else {
for (int i = palength - sb.length(); i > 0; i--) {
sb.append(' ');
}
if (sb.length() > maxPaLength) {// to huge part A
out.println(sb);
sb.setLength(0);
for (int i = 0; i < palength; i++) {
sb.append(' ');
}
}
int nextStart = 0;
while (nextStart < desc.length()) {
if (desc.length() - nextStart < pblength) {// can put in one line
sb.append(desc.substring(nextStart));
out.println(sb);
nextStart = desc.length();
sb.setLength(0);
} else {
sb.append(desc.substring(nextStart, nextStart + pblength));
out.println(sb);
nextStart += pblength;
sb.setLength(0);
if (nextStart < desc.length()) {
for (int i = 0; i < palength; i++) {
sb.append(' ');
}
}
}
}
if (sb.length() > 0) {
out.println(sb);
sb.setLength(0);
}
}
}
String ver = getVersionString();
if (ver != null && !"".equals(ver)) {
out.println("version: " + ver);
}
if (onlineHelp != null && !"".equals(onlineHelp)) {
if (onlineHelp.length() + "online help: ".length() > maxLength) {
out.println("online help: ");
out.println(onlineHelp);
} else {
out.println("online help: " + onlineHelp);
}
}
out.flush();
}
}
================================================
FILE: d2j-j6/README.md
================================================
# j6 Generate dex2jar for jdk6
dex2jar 2.0 change the compile jdk to version 1.7, but there still requirement for running dex2jar on jdk6. this project is try make dex2jar runnable on jdk6.
## jdk7 vs jdk6
### the major version of class file is changed
jdk6 can not run class file build for jdk7
### new package java.nio.file
jdk7 add the java.nio.file package for file processing, and dex2jar heavy based on it,
#### Related new Class
* java.nio.file.\*\*
#### Related new method
* File.toPath()
### try-with-resource
This is a good improvement for coding, i can' stop using it.
the AutoCloseable interface is used for close the resource, and addSuppressed/getSuppressed is Throwable is used for save the Exception during close resource.
#### Related new Class
* java.lang.AutoCloseable
#### Related new method
* Throwable.addSuppressed()
* Throwable.getSuppressed()
### other improvement
#### Related new Class
* java.nio.charset.StandardCharsets
## Solution
* For each missing class, create a new class with prefixed 'pxb.' in this project.
* For each missing method, create a static method in this project and use the d2j-jar-weave feature of dex2jar to static weave the code into the origianl jar.
```
r Ljava/io/File;.toPath=Lj6/Files;.toPath(Ljava/io/File;)Ljava/lang/Object;
r Ljava/lang/Throwable;.addSuppressed(Ljava/lang/Throwable;)=Lj6/Thro;.addSuppressed(Ljava/lang/Throwable;Ljava/lang/Throwable;)V;
r [Ljava/lang/Throwable;.getSuppressed()=Lj6/Thro;.getSuppressed(Ljava/lang/Throwable;)[Ljava/lang/Throwable;
```
* Replace the following reference in original jar by the tool jarjar
```
rule java.nio.file.** pxb.@0
rule java.nio.charset.StandardCharsets pxb.java.nio.charset.StandardCharsets
rule java.lang.AutoCloseable java.io.Closeable
```
* Modify the version of all .class file to java6
## Test
this the following VM have been tested (only the cmd d2j-dex2jar)
* Oracle jdk 1.6.0_45, on 64bit linux
* Dalvik VM on android 4.4.2 armv7a with '-Xmx512m' to increase memory
================================================
FILE: d2j-j6/build.gradle
================================================
configurations {
jarjar
proguard
}
dependencies {
compile project(':dex-tools')
jarjar 'com.googlecode.jarjar:jarjar:1.3'
proguard 'net.sf.proguard:proguard-base:5.2.1'
}
task allinone(type: Jar, dependsOn: jar) {
archiveName = 'all-in-one.jar'
def deps = configurations.runtime
def depClasses = { deps.collect { it.isDirectory() ? it : zipTree(it) } }
from(depClasses) {
exclude 'META-INF/**'
}
from(sourceSets.main.output)
manifest {
attributes 'Main-Class': 'com.googlecode.dex2jar.tools.Dex2jarCmd'
attributes("Implementation-Title": project.name,
"Implementation-Version": project.version,
"Build-Time": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"Revision":"${getRevision()}",
"Build-Number": System.env.BUILD_NUMBER?System.env.BUILD_NUMBER:"-1",
)
}
}
task j6version(type: JavaExec, dependsOn: allinone) {
classpath sourceSets.main.runtimeClasspath
main='com.googlecode.dex2jar.tools.ClassVersionSwitch'
args=["6","$allinone.destinationDir/$allinone.archiveName", "$allinone.destinationDir/j6.jar"]
}
task j6weave(type: JavaExec, dependsOn: j6version) {
classpath sourceSets.main.runtimeClasspath
main='com.googlecode.dex2jar.tools.JarWeaverCmd'
args=["-c", "$projectDir/j6-weave.txt", "$allinone.destinationDir/j6.jar", "-o", "$allinone.destinationDir/weaved.jar"]
}
task j6jarjar(type: JavaExec, dependsOn: j6weave) {
classpath configurations.jarjar
main='com.tonicsystems.jarjar.Main'
args=["process", "$projectDir/jarjar-rules.txt", "$allinone.destinationDir/weaved.jar", "$projectDir/build/dex2jar-for-jdk6.jar"]
}
task j6proguard(type: JavaExec, dependsOn: j6jarjar) {
classpath=configurations.proguard
main='proguard.ProGuard'
args=['-injars', "$projectDir/build/dex2jar-for-jdk6.jar" , '-outjars',"$projectDir/build/dex2jar-for-jdk6-obfuscated.jar", "-printmapping", "$projectDir/build/dex2jar-for-jdk6-mapping.txt", "@$projectDir/proguard.txt"]
}
task jdk6 {
dependsOn j6jarjar
dependsOn j6proguard
}
================================================
FILE: d2j-j6/j6-weave.txt
================================================
#
r Ljava/io/File;.toPath=Lj6/Files;.toPath(Ljava/io/File;)Ljava/lang/Object;
r Ljava/lang/Throwable;.addSuppressed(Ljava/lang/Throwable;)=Lj6/Thro;.addSuppressed(Ljava/lang/Throwable;Ljava/lang/Throwable;)V;
r [Ljava/lang/Throwable;.getSuppressed()=Lj6/Thro;.getSuppressed(Ljava/lang/Throwable;)[Ljava/lang/Throwable;
================================================
FILE: d2j-j6/jarjar-rules.txt
================================================
rule java.nio.file.** pxb.@0
rule java.nio.charset.StandardCharsets pxb.java.nio.charset.StandardCharsets
rule java.lang.AutoCloseable java.io.Closeable
================================================
FILE: d2j-j6/proguard.txt
================================================
-libraryjars <java.home>/lib/rt.jar
-keepattributes AnnotationDefault,RuntimeVisible*Annotations,Signature
-repackageclasses d2j
-allowaccessmodification
#-dontobfuscate
-keep public class com.googlecode.dex2jar.tools.Dex2jarCmd {public static void main(java.lang.String[]);}
-keep,allowobfuscation public class com.googlecode.dex2jar.tools.Dex2jarCmd {@com.googlecode.dex2jar.tools.BaseCmd$Opt <fields>;}
-dontwarn **
================================================
FILE: d2j-j6/src/main/java/j6/Files.java
================================================
package j6;
import pxb.java.nio.file.spi.FileSystemProvider;
import java.io.File;
public class Files {
public static Object toPath(File file) throws Throwable {
return new FileSystemProvider.DefPath(file);
}
}
================================================
FILE: d2j-j6/src/main/java/j6/Thro.java
================================================
package j6;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Thro {
static Map<Throwable, List<Throwable>> aa = new HashMap<>();
public static void addSuppressed(Throwable a, Throwable b) {
List<Throwable> list = aa.get(a);
if (list == null) {
list = new ArrayList<>();
aa.put(a, list);
}
list.add(b);
}
public static Throwable[] getSuppressed(Throwable a) {
List<Throwable> list = aa.remove(a);
if (list == null) {
return null;
}
return list.toArray(new Throwable[list.size()]);
}
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/charset/StandardCharsets.java
================================================
package pxb.java.nio.charset;
import java.nio.charset.Charset;
public class StandardCharsets {
public static Charset UTF_8 = Charset.forName("UTF-8");
public static Charset ISO_8859_1 = Charset.forName("iso-8859-1");
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/CopyOption.java
================================================
package pxb.java.nio.file;
public interface CopyOption {
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/FileSystem.java
================================================
package pxb.java.nio.file;
import java.io.Closeable;
public abstract class FileSystem implements Closeable {
public abstract Path getPath(String first, String... more);
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/FileVisitResult.java
================================================
package pxb.java.nio.file;
public enum FileVisitResult {
CONTINUE,TERMINATE,SKIP_SUBTREE, SKIP_SIBLINGS;
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/FileVisitor.java
================================================
package pxb.java.nio.file;
import java.io.IOException;
import pxb.java.nio.file.attribute.BasicFileAttributes;
public interface FileVisitor<T> {
FileVisitResult preVisitDirectory(T dir, BasicFileAttributes attrs)
throws IOException;
FileVisitResult visitFile(T file, BasicFileAttributes attrs)
throws IOException;
FileVisitResult visitFileFailed(T file, IOException exc)
throws IOException;
FileVisitResult postVisitDirectory(T dir, IOException exc)
throws IOException;
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/Files.java
================================================
package pxb.java.nio.file;
import pxb.java.nio.file.attribute.FileAttribute;
import pxb.java.nio.file.spi.FileSystemProvider;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class Files {
public static Path write(Path path, byte[] bytes, OpenOption... options)
throws IOException {
path._write(bytes);
return path;
}
public static byte[] readAllBytes(Path path) throws IOException {
return path._readAllBytes();
}
public static boolean isDirectory(Path path, LinkOption... options) {
return path._isDirectory();
}
public static boolean exists(Path path, LinkOption... options) {
return path._exists();
}
public static OutputStream newOutputStream(Path path, OpenOption... options)
throws IOException {
return path._newOutputStream();
}
public static InputStream newInputStream(Path path, OpenOption... options)
throws IOException {
return path._newInputStream();
}
public static boolean deleteIfExists(Path path) throws IOException {
return path._deleteIfExists();
}
public static Path createDirectories(Path dir, FileAttribute... attrs)
throws IOException {
return dir._createDirectories();
}
public static Path walkFileTree(Path start, FileVisitor<? super Path> visitor)
throws IOException {
start._walkFileTree(visitor);
return start;
}
public static Path createTempFile(String prefix,
String suffix,
FileAttribute<?>... attrs) throws IOException {
File f = File.createTempFile(prefix, suffix);
return new FileSystemProvider.DefPath(f, null);
}
public static Path copy(Path source, Path target, CopyOption... options) throws IOException {
InputStream is = source._newInputStream();
OutputStream os = target._newOutputStream();
FileSystemProvider.copy(is, os);
is.close();
os.close();
return target;
}
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/LinkOption.java
================================================
package pxb.java.nio.file;
public interface LinkOption {
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/OpenOption.java
================================================
package pxb.java.nio.file;
public interface OpenOption {
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/Path.java
================================================
package pxb.java.nio.file;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public interface Path {
Path resolve(String other);
Path getFileName();
Path getParent();
File toFile();
String toString();
byte[] _readAllBytes() throws IOException;
OutputStream _newOutputStream() throws IOException;
boolean _isDirectory();
Path _createDirectories() throws IOException;
boolean _deleteIfExists();
boolean _exists();
void _write(byte[] b) throws IOException;
void _walkFileTree(FileVisitor<? super Path> visitor) throws IOException;
Path relativize(Path other);
InputStream _newInputStream() throws IOException;
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/SimpleFileVisitor.java
================================================
package pxb.java.nio.file;
import pxb.java.nio.file.attribute.BasicFileAttributes;
import java.io.IOException;
public class SimpleFileVisitor<T> implements FileVisitor<T> {
@Override
public FileVisitResult preVisitDirectory(T dir, BasicFileAttributes attrs)
throws IOException {
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult visitFile(T file, BasicFileAttributes attrs)
throws IOException {
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult visitFileFailed(T file, IOException exc)
throws IOException {
throw exc;
}
@Override
public FileVisitResult postVisitDirectory(T dir, IOException exc)
throws IOException {
if (exc != null)
throw exc;
return FileVisitResult.CONTINUE;
}
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/attribute/BasicFileAttributes.java
================================================
package pxb.java.nio.file.attribute;
public interface BasicFileAttributes {
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/attribute/FileAttribute.java
================================================
package pxb.java.nio.file.attribute;
public interface FileAttribute<T> {
}
================================================
FILE: d2j-j6/src/main/java/pxb/java/nio/file/spi/FileSystemProvider.java
================================================
package pxb.java.nio.file.spi;
import pxb.java.nio.file.FileSystem;
import pxb.java.nio.file.FileVisitor;
import pxb.java.nio.file.Path;
import java.io.*;
import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;
public abstract class FileSystemProvider {
public static void copy(InputStream is, OutputStream os) throws IOException {
byte[] xml = new byte[10 * 1024];
for (int c = is.read(xml); c > 0; c = is.read(xml)) {
os.write(xml, 0, c);
}
}
public static byte[] readFile(File in) throws IOException {
InputStream is = new FileInputStream(in);
byte[] xml = new byte[is.available()];
is.read(xml);
is.close();
return xml;
}
public static byte[] readIs(InputStream is) throws IOException {
ByteArrayOutputStream os = new ByteArrayOutputStream();
copy(is, os);
return os.toByteArray();
}
public static void writeFile(byte[] data, File out) throws IOException {
FileOutputStream fos = new FileOutputStream(out);
fos.write(data);
fos.close();
}
public static FileSystemProvider ZIP = new ZipFSP();
public static FileSystemProvider DEF = new DirFSP();
public static List<FileSystemProvider> installedProviders() {
return Arrays.asList(ZIP, DEF);
}
public abstract String getScheme();
public abstract FileSystem newFileSystem(Path path, Map<String, ?> env) throws IOException;
static class CreatZipFS extends FileSystem {
ZipOutputStream zos;
class CreateZipPath implements Path {
String path;
String displayName;
public CreateZipPath(String s, String displayName) {
this.path = s;
this.displayName = displayName;
}
@Override
public Path resolve(String other) {
if (path.endsWith("/")) {
return new CreateZipPath(path + other, null);
}
return new CreateZipPath(path + "/" + other, null);
}
@Override
public Path getFileName() {
int t = path.length() - 1;
if (path.endsWith("/")) {
t--;
}
int i = path.lastIndexOf('/', t);
if (i > 0) {
return new CreateZipPath(path, path.substring(i + 1, t + 1));
} else {
return this;
}
}
@Override
public String toString() {
return displayName != null ? displayName : path;
}
@Override
public Path getParent() {
int i = path.lastIndexOf('/', path.length() - 2);
if (i > 0) {
return new CreateZipPath(path.substring(0, i), null);
}
return null;
}
@Override
public File toFile() {
return null;
}
@Override
public byte[] _readAllBytes() {
throw new RuntimeException();
}
@Override
public OutputStream _newOutputStream() throws IOException {
ZipEntry e = new ZipEntry(path.substring(1));
zos.putNextEntry(e);
return new FilterOutputStream(zos) {
@Override
public void close() throws IOException {
zos.closeEntry();
}
};
}
@Override
public boolean _isDirectory() {
return path.endsWith("/");
}
@Override
public Path _createDirectories() throws IOException {
createDir0(path);
return this;
}
@Override
public boolean _deleteIfExists() {
throw new RuntimeException();
}
@Override
public boolean _exists() {
return exists(path);
}
@Override
public void _write(byte[] b) throws IOException {
OutputStream os = _newOutputStream();
os.write(b);
os.close();
}
@Override
public void _walkFileTree(FileVisitor<? super Path> visitor) {
throw new RuntimeException();
}
@Override
public Path relativize(Path other) {
CreateZipPath p0 = (CreateZipPath) other;
String display = path.substring(p0.path.length());
return new CreateZipPath(p0.path, display);
}
@Override
public InputStream _newInputStream() throws IOException {
throw new RuntimeException();
}
}
private boolean createDir0(String path) throws IOException {
int x = path.lastIndexOf('/', path.length() - 2);
if (x > 0) {
String n = path.substring(0, x + 1);
createDir0(n);
}
if (!path.contains(path)) {
files.add(path);
ZipEntry zipEntry = new ZipEntry(path);
zos.putNextEntry(zipEntry);
zos.closeEntry();
return true;
}
return false;
}
private Set<String> files = new HashSet<>();
private boolean exists(String path) {
return files.contains(path);
}
public CreatZipFS(ZipOutputStream zipFile) {
this.zos = zipFile;
}
@Override
public void close() throws IOException {
zos.close();
}
@Override
public Path getPath(String first, String... more) {
return new CreateZipPath(first, null);
}
}
static class ReadZipPath implements Path {
ZipFile zipFile;
String path;
String displayName;
public ReadZipPath(ZipFile zipFile, String path) {
this(zipFile, path, null);
}
public ReadZipPath(ZipFile zipFile, String path, String substring) {
this.zipFile = zipFile;
this.path = path;
this.displayName = substring;
}
@Override
public Path resolve(String other) {
if (path.endsWith("/")) {
return new ReadZipPath(zipFile, path + other);
} else {
return new ReadZipPath(zipFile, path + "/" + other);
}
}
@Override
public Path getFileName() {
int t = path.length() - 1;
if (path.endsWith("/")) {
t--;
}
int i = path.lastIndexOf('/', t);
if (i > 0) {
return new ReadZipPath(zipFile, path, path.substring(i + 1, t + 1));
} else {
return this;
}
}
@Override
public Path getParent() {
int t = path.length() - 1;
if (path.endsWith("/")) {
t--;
}
int i = path.lastIndexOf('/', t);
return i > 0 ? new ReadZipPath(zipFile, path.substring(0, i + 1), null) : null;
}
@Override
public File toFile() {
return null;
}
@Override
public String toString() {
return displayName != null ? displayName : path;
}
@Override
public byte[] _readAllBytes() throws IOException {
ZipEntry e = zipFile.getEntry(path);
return e != null ? readIs(zipFile.getInputStream(e)) : null;
}
@Override
public OutputStream _newOutputStream() throws FileNotFoundException {
throw new RuntimeException();
}
@Override
public boolean _isDirectory() {
ZipEntry e = zipFile.getEntry(path);
return e != null && e.isDirectory();
}
@Override
public Path _createDirectories() {
throw new RuntimeException();
}
@Override
public boolean _deleteIfExists() {
throw new RuntimeException();
}
@Override
public boolean _exists() {
ZipEntry e = zipFile.getEntry(path);
return e != null;
}
@Override
public void _write(byte[] b) throws IOException {
throw new RuntimeException();
}
@Override
public void _walkFileTree(FileVisitor<? super Path> visitor) throws IOException {
for (Enumeration<? extends ZipEntry> e = zipFile.entries(); e.hasMoreElements(); ) {
ZipEntry zipEntry = e.nextElement();
ReadZipPath readZipPath = new ReadZipPath(zipFile, zipEntry.getName());
if (zipEntry.isDirectory()) {
visitor.preVisitDirectory(readZipPath, null);
visitor.postVisitDirectory(readZipPath, null);
} else {
visitor.visitFile(readZipPath, null);
}
}
}
@Override
public Path relativize(Path other) {
ReadZipPath p0 = (ReadZipPath) other;
String display = path.substring(p0.path.length());
return new ReadZipPath(zipFile, p0.path, display);
}
@Override
public InputStream _newInputStream() throws IOException {
ZipEntry e = zipFile.getEntry(path);
return e != null ? zipFile.getInputStream(e) : null;
}
}
static class ReadZipFS extends FileSystem {
ZipFile zipFile;
public ReadZipFS(ZipFile zipFile) {
this.zipFile = zipFile;
}
@Override
public void close() throws IOException {
zipFile.close();
}
@Override
public Path getPath(String first, String... more) {
return new ReadZipPath(zipFile, first);
}
}
static class ZipFSP extends FileSystemProvider {
@Override
public String getScheme() {
return "zip";
}
@Override
public FileSystem newFileSystem(Path path, Map<String, ?> env) throws IOException {
if (env != null && "true".equals(env.get("create"))) {
return new CreatZipFS(new ZipOutputStream(path._newOutputStream()));
} else {
return new ReadZipFS(new ZipFile(((DefPath) path).file));
}
}
}
public static class DefPath implements Path {
File file;
String displayName;
public DefPath(File file) {
this.file = file;
}
public DefPath(File file, String name) {
this.file = file;
this.displayName = name;
}
@Override
public String toString() {
return displayName != null ? displayName : file.toString();
}
@Override
public Path resolve(String other) {
return new DefPath(new File(file, other));
}
@Override
public Path getFileName() {
return new DefPath(file, file.getName());
}
@Override
public Path getParent() {
return new DefPath(file.getParentFile());
}
@Override
public File toFile() {
return file;
}
@Override
public byte[] _readAllBytes() throws IOException {
return readFile(file);
}
@Override
public OutputStream _newOutputStream() throws FileNotFoundException {
return new BufferedOutputStream(new FileOutputStream(file));
}
@Override
public boolean _isDirectory() {
return file.isDirectory();
}
@Override
public Path _createDirectories() {
file.mkdirs();
return this;
}
@Override
public boolean _deleteIfExists() {
return file.exists() && file.delete();
}
@Override
public boolean _exists() {
return file.exists();
}
@Override
public void _write(byte[] b) throws IOException {
OutputStream os = _newOutputStream();
os.write(b);
os.close();
}
@Override
public void _walkFileTree(FileVisitor<? super Path> visitor) throws IOException {
walk0(this, visitor);
}
public static void walk0(DefPath dir, FileVisitor<? super Path> visitor) throws IOException {
visitor.preVisitDirectory(dir, null);
File[] fs = dir.file.listFiles();
if (fs != null) {
for (File f : fs) {
if (f.isDirectory()) {
walk0(new DefPath(f, null), visitor);
} else {
visitor.visitFile(new DefPath(f, null), null);
}
}
}
visitor.postVisitDirectory(dir, null);
}
@Override
public Path relativize(Path other) {
DefPath p0 = (DefPath) other;
String display = file.getAbsolutePath().substring(p0.file.getAbsolutePath().length());
return new DefPath(p0.file, display);
}
@Override
public InputStream _newInputStream() throws FileNotFoundException {
return new BufferedInputStream(new FileInputStream(file));
}
}
static class DirFSP extends FileSystemProvider {
@Override
public String getScheme() {
return "default";
}
@Override
public FileSystem newFileSystem(Path path, Map<String, ?> env) {
throw new RuntimeException();
}
}
}
================================================
FILE: d2j-jasmin/build.gradle
================================================
apply plugin: 'antlr'
dependencies {
compile(group: 'org.antlr', name: 'antlr-runtime', version:'3.5.2') {
exclude(module: 'stringtemplate')
}
compile "org.ow2.asm:asm-debug-all:5.0.3"
compile project(':d2j-base-cmd')
antlr "org.antlr:antlr:3.5.2"
}
sourceSets.main.antlr.srcDirs = ['src/main/antlr3']
================================================
FILE: d2j-jasmin/src/main/antlr3/com/googlecode/d2j/jasmin/Jasmin.g
================================================
grammar Jasmin;
@header {
package com.googlecode.d2j.jasmin;
import java.util.List;
import java.util.ArrayList;
import java.math.BigInteger;
import org.objectweb.asm.*;
import org.objectweb.asm.tree.*;
import static org.objectweb.asm.Opcodes.*;
}
@lexer::header {
package com.googlecode.d2j.jasmin;
}
@members{
private static int versions[] = { 0, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, 52 // V1_8 ?
, 53 // V1_9 ?
};
private ClassNode cn;
private FieldNode fn;
private MethodNode mn;
private String tmp;
private int tmpInt;
private String tmp2;
public boolean rebuildLine=false;
private java.util.Map<String, Label> labelMap = new java.util.HashMap<>();
private void reset0() {
cn = new ClassNode(ASM4);
fn = null;
mn = null;
}
static private int parseInt(String str, int start, int end) {
int sof = start;
int x = 1;
if (str.charAt(sof) == '+') {
sof++;
} else if (str.charAt(sof) == '-') {
sof++;
x = -1;
}
long v;
if (str.charAt(sof) == '0') {
sof++;
if (sof >= end) {
return 0;
}
char c = str.charAt(sof);
if (c == 'x' || c == 'X') {// hex
sof++;
v = Long.parseLong(str.substring(sof, end), 16);
} else {// oct
v = Long.parseLong(str.substring(sof, end), 8);
}
} else {
v = Long.parseLong(str.substring(sof, end), 10);
}
return (int) (v * x);
}
static private int parseInt(String str) {
return parseInt(str, 0, str.length());
}
static private Long parseLong(String str) {
int sof = 0;
int end = str.length() - 1;
int x = 1;
if (str.charAt(sof) == '+') {
sof++;
} else if (str.charAt(sof) == '-') {
sof++;
x = -1;
}
BigInteger v;
if (str.charAt(sof) == '0') {
sof++;
if (sof >= end) {
return 0L;
}
char c = str.charAt(sof);
if (c == 'x' || c == 'X') {// hex
sof++;
v = new BigInteger(str.substring(sof, end), 16);
} else {// oct
v = new BigInteger(str.substring(sof, end), 8);
}
} else {
v = new BigInteger(str.substring(sof, end), 10);
}
if (x == -1) {
return v.negate().longValue();
} else {
return v.longValue();
}
}
static private float parseFloat(String str) {
str = str.toLowerCase();
int s = 0;
float x = 1f;
if (str.charAt(s) == '+') {
s++;
} else if (str.charAt(s) == '-') {
s++;
x = -1;
}
int e = str.length() - 1;
if (str.charAt(e) == 'f') {
e--;
}
str = str.substring(s, e + 1);
if (str.equals("floatnan")) {
return Float.NaN;
}
if (str.equals("floatinfinity")) {
return x < 0 ? Float.NEGATIVE_INFINITY : Float.POSITIVE_INFINITY;
}
return (float) x * Float.parseFloat(str);
}
static private double parseDouble(String str) {
str = str.toLowerCase();
int s = 0;
double x = 1;
if (str.charAt(s) == '+') {
s++;
} else if (str.charAt(s) == '-') {
s++;
x = -1;
}
int e = str.length() - 1;
if (str.charAt(e) == 'd') {
e--;
}
str = str.substring(s, e + 1);
if (str.equals("doublenan")) {
return Double.NaN;
}
if (str.equals("doubleinfinity")) {
return x < 0 ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY;
}
return x * Double.parseDouble(str);
}
private void line(int ln){
if(rebuildLine) {
Label label=new Label();
mn.visitLabel(label);
mn.visitLineNumber(ln, label);
}
}
private static String unEscapeString(String str) {
return unEscape0(str, 1, str.length() - 1);
}
private static String unEscape(String str) {
return unEscape0(str, 0, str.length());
}
private static String unEscape0(String str, int start, int end) {
StringBuilder sb = new StringBuilder();
for (int i = start; i < end;) {
char c = str.charAt(i);
if (c == '\\') {
char d = str.charAt(i + 1);
switch (d) {
// ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
case 'b':
sb.append('\b');
i += 2;
break;
case 't':
sb.append('\t');
i += 2;
break;
case 'n':
sb.append('\n');
i += 2;
break;
case 'f':
sb.append('\f');
i += 2;
break;
case 'r':
sb.append('\r');
i += 2;
break;
case '\"':
sb.append('\"');
i += 2;
break;
case '\'':
sb.append('\'');
i += 2;
break;
case '\\':
sb.append('\\');
i += 2;
break;
case 'u':
String sub = str.substring(i + 2, i + 6);
sb.append((char) Integer.parseInt(sub, 16));
i += 6;
break;
default:
int x = 0;
while (x < 3) {
char e = str.charAt(i + 1 + x);
if (e >= '0' && e <= '7') {
x++;
} else {
break;
}
}
if (x == 0) {
throw new RuntimeException("can't pase string");
}
sb.append((char) Integer.parseInt(str.substring(i + 1, i + 1 + x), 8));
i += 1 + x;
}
} else {
sb.append(c);
i++;
}
}
return sb.toString();
}
private static int getAcc(String name) {
if (name.equals("public")) {
return ACC_PUBLIC;
} else if (name.equals("private")) {
return ACC_PRIVATE;
} else if (name.equals("protected")) {
return ACC_PROTECTED;
} else if (name.equals("static")) {
return ACC_STATIC;
} else if (name.equals("final")) {
return ACC_FINAL;
} else if (name.equals("synchronized")) {
return ACC_SYNCHRONIZED;
} else if (name.equals("volatile")) {
return ACC_VOLATILE;
} else if (name.equals("bridge")) {
return ACC_BRIDGE;
} else if (name.equals("varargs")) {
return ACC_VARARGS;
} else if (name.equals("transient")) {
return ACC_TRANSIENT;
} else if (name.equals("native")) {
return ACC_NATIVE;
} else if (name.equals("interface")) {
return ACC_INTERFACE;
} else if (name.equals("abstract")) {
return ACC_ABSTRACT;
} else if (name.equals("strict")) {
return ACC_STRICT;
} else if (name.equals("strictfp")) {
return ACC_STRICT;
} else if (name.equals("synthetic")) {
return ACC_SYNTHETIC;
} else if (name.equals("annotation")) {
return ACC_ANNOTATION;
} else if (name.equals("enum")) {
return ACC_ENUM;
} else if (name.equals("super")) {
return ACC_SUPER;
}
throw new RuntimeException("not support access flags " + name);
}
private static int getOp(String str) {
switch (str) {
case "nop":
return Opcodes.NOP;
case "aconst_null":
return Opcodes.ACONST_NULL;
case "iconst_m1":
return Opcodes.ICONST_M1;
case "iconst_0":
return Opcodes.ICONST_0;
case "iconst_1":
return Opcodes.ICONST_1;
case "iconst_2":
return Opcodes.ICONST_2;
case "iconst_3":
return Opcodes.ICONST_3;
case "iconst_4":
return Opcodes.ICONST_4;
case "iconst_5":
return Opcodes.ICONST_5;
case "lconst_0":
return Opcodes.LCONST_0;
case "lconst_1":
return Opcodes.LCONST_1;
case "fconst_0":
return Opcodes.FCONST_0;
case "fconst_1":
return Opcodes.FCONST_1;
case "fconst_2":
return Opcodes.FCONST_2;
case "dconst_0":
return Opcodes.DCONST_0;
case "dconst_1":
return Opcodes.DCONST_1;
case "bipush":
return Opcodes.BIPUSH;
case "sipush":
return Opcodes.SIPUSH;
case "ldc_w":
case "ldc2_w":
case "ldc":
return Opcodes.LDC;
case "iload":
return Opcodes.ILOAD;
case "lload":
return Opcodes.LLOAD;
case "fload":
return Opcodes.FLOAD;
case "dload":
return Opcodes.DLOAD;
case "aload":
return Opcodes.ALOAD;
case "iaload":
return Opcodes.IALOAD;
case "laload":
return Opcodes.LALOAD;
case "faload":
return Opcodes.FALOAD;
case "daload":
return Opcodes.DALOAD;
case "aaload":
return Opcodes.AALOAD;
case "baload":
return Opcodes.BALOAD;
case "caload":
return Opcodes.CALOAD;
case "saload":
return Opcodes.SALOAD;
case "istore":
return Opcodes.ISTORE;
case "lstore":
return Opcodes.LSTORE;
case "fstore":
return Opcodes.FSTORE;
case "dstore":
return Opcodes.DSTORE;
case "astore":
return Opcodes.ASTORE;
case "iastore":
return Opcodes.IASTORE;
case "lastore":
return Opcodes.LASTORE;
case "fastore":
return Opcodes.FASTORE;
case "dastore":
return Opcodes.DASTORE;
case "aastore":
return Opcodes.AASTORE;
case "bastore":
return Opcodes.BASTORE;
case "castore":
return Opcodes.CASTORE;
case "sastore":
return Opcodes.SASTORE;
case "pop":
return Opcodes.POP;
case "pop2":
return Opcodes.POP2;
case "dup":
return Opcodes.DUP;
case "dup_x1":
return Opcodes.DUP_X1;
case "dup_x2":
return Opcodes.DUP_X2;
case "dup2":
return Opcodes.DUP2;
case "dup2_x1":
return Opcodes.DUP2_X1;
case "dup2_x2":
return Opcodes.DUP2_X2;
case "swap":
return Opcodes.SWAP;
case "iadd":
return Opcodes.IADD;
case "ladd":
return Opcodes.LADD;
case "fadd":
return Opcodes.FADD;
case "dadd":
return Opcodes.DADD;
case "isub":
return Opcodes.ISUB;
case "lsub":
return Opcodes.LSUB;
case "fsub":
return Opcodes.FSUB;
case "dsub":
return Opcodes.DSUB;
case "imul":
return Opcodes.IMUL;
case "lmul":
return Opcodes.LMUL;
case "fmul":
return Opcodes.FMUL;
case "dmul":
return Opcodes.DMUL;
case "idiv":
return Opcodes.IDIV;
case "ldiv":
return Opcodes.LDIV;
case "fdiv":
return Opcodes.FDIV;
case "ddiv":
return Opcodes.DDIV;
case "irem":
return Opcodes.IREM;
case "lrem":
return Opcodes.LREM;
case "frem":
return Opcodes.FREM;
case "drem":
return Opcodes.DREM;
case "ineg":
return Opcodes.INEG;
case "lneg":
return Opcodes.LNEG;
case "fneg":
return Opcodes.FNEG;
case "dneg":
return Opcodes.DNEG;
case "ishl":
return Opcodes.ISHL;
case "lshl":
return Opcodes.LSHL;
case "ishr":
return Opcodes.ISHR;
case "lshr":
return Opcodes.LSHR;
case "iushr":
return Opcodes.IUSHR;
case "lushr":
return Opcodes.LUSHR;
case "iand":
return Opcodes.IAND;
case "land":
return Opcodes.LAND;
case "ior":
return Opcodes.IOR;
case "lor":
return Opcodes.LOR;
case "ixor":
return Opcodes.IXOR;
case "lxor":
return Opcodes.LXOR;
case "iinc":
return Opcodes.IINC;
case "i2l":
return Opcodes.I2L;
case "i2f":
return Opcodes.I2F;
case "i2d":
return Opcodes.I2D;
case "l2i":
return Opcodes.L2I;
case "l2f":
return Opcodes.L2F;
case "l2d":
return Opcodes.L2D;
case "f2i":
return Opcodes.F2I;
case "f2l":
return Opcodes.F2L;
case "f2d":
return Opcodes.F2D;
case "d2i":
return Opcodes.D2I;
case "d2l":
return Opcodes.D2L;
case "d2f":
return Opcodes.D2F;
case "i2b":
return Opcodes.I2B;
case "i2c":
return Opcodes.I2C;
case "i2s":
return Opcodes.I2S;
case "lcmp":
return Opcodes.LCMP;
case "fcmpl":
return Opcodes.FCMPL;
case "fcmpg":
return Opcodes.FCMPG;
case "dcmpl":
return Opcodes.DCMPL;
case "dcmpg":
return Opcodes.DCMPG;
case "ifeq":
return Opcodes.IFEQ;
case "ifne":
return Opcodes.IFNE;
case "iflt":
return Opcodes.IFLT;
case "ifge":
return Opcodes.IFGE;
case "ifgt":
return Opcodes.IFGT;
case "ifle":
return Opcodes.IFLE;
case "if_icmpeq":
return Opcodes.IF_ICMPEQ;
case "if_icmpne":
return Opcodes.IF_ICMPNE;
case "if_icmplt":
return Opcodes.IF_ICMPLT;
case "if_icmpge":
return Opcodes.IF_ICMPGE;
case "if_icmpgt":
return Opcodes.IF_ICMPGT;
case "if_icmple":
return Opcodes.IF_ICMPLE;
case "if_acmpeq":
return Opcodes.IF_ACMPEQ;
case "if_acmpne":
return Opcodes.IF_ACMPNE;
case "goto":
return Opcodes.GOTO;
case "jsr":
return Opcodes.JSR;
case "ret":
return Opcodes.RET;
case "tableswitch":
return Opcodes.TABLESWITCH;
case "lookupswitch":
return Opcodes.LOOKUPSWITCH;
case "ireturn":
return Opcodes.IRETURN;
case "lreturn":
return Opcodes.LRETURN;
case "freturn":
return Opcodes.FRETURN;
case "dreturn":
return Opcodes.DRETURN;
case "areturn":
return Opcodes.ARETURN;
case "return":
return Opcodes.RETURN;
case "getstatic":
return Opcodes.GETSTATIC;
case "putstatic":
return Opcodes.PUTSTATIC;
case "getfield":
return Opcodes.GETFIELD;
case "putfield":
return Opcodes.PUTFIELD;
case "invokevirtual":
return Opcodes.INVOKEVIRTUAL;
case "invokespecial":
return Opcodes.INVOKESPECIAL;
case "invokestatic":
return Opcodes.INVOKESTATIC;
case "invokeinterface":
return Opcodes.INVOKEINTERFACE;
case "invokedynamic":
return Opcodes.INVOKEDYNAMIC;
case "new":
return Opcodes.NEW;
case "newarray":
return Opcodes.NEWARRAY;
case "anewarray":
return Opcodes.ANEWARRAY;
case "arraylength":
return Opcodes.ARRAYLENGTH;
case "athrow":
return Opcodes.ATHROW;
case "checkcast":
return Opcodes.CHECKCAST;
case "instanceof":
return Opcodes.INSTANCEOF;
case "monitorenter":
return Opcodes.MONITORENTER;
case "monitorexit":
return Opcodes.MONITOREXIT;
case "multianewarray":
return Opcodes.MULTIANEWARRAY;
case "ifnull":
return Opcodes.IFNULL;
case "ifnonnull":
return Opcodes.IFNONNULL;
case "iload_0":
return 26;
case "iload_1":
return 27;
case "iload_2":
return 28;
case "iload_3":
return 29;
case "lload_0":
return 30;
case "lload_1":
return 31;
case "lload_2":
return 32;
case "lload_3":
return 33;
case "fload_0":
return 34;
case "fload_1":
return 35;
case "fload_2":
return 36;
case "fload_3":
return 37;
case "dload_0":
return 38;
case "dload_1":
return 39;
case "dload_2":
return 40;
case "dload_3":
return 41;
case "aload_0":
return 42;
case "aload_1":
return 43;
case "aload_2":
return 44;
case "aload_3":
return 45;
case "istore_0":
return 59;
case "istore_1":
return 60;
case "istore_2":
return 61;
case "istore_3":
return 62;
case "lstore_0":
return 63;
case "lstore_1":
return 64;
case "lstore_2":
return 65;
case "lstore_3":
return 66;
case "fstore_0":
return 67;
case "fstore_1":
return 68;
case "fstore_2":
return 69;
case "fstore_3":
return 70;
case "dstore_0":
return 71;
case "dstore_1":
return 72;
case "dstore_2":
return 73;
case "dstore_3":
return 74;
case "astore_0":
return 75;
case "astore_1":
return 76;
case "astore_2":
return 77;
case "astore_3":
return 78;
}
return 0;
}
private String[] parseOwnerAndName(String str) {
int x=str.lastIndexOf('/');
if(x>0){
return new String[]{ unEscape0(str,0,x), unEscape0(str,x+1,str.length()) };
}
throw new RuntimeException("can't get owner and type from '"+str+"'");
}
public Object parseValue(String desc, Object v) {
switch(desc) {
case "Z": return ((Number)v).intValue()!=0;
case "B": return ((Number)v).byteValue();
case "S": return ((Number)v).shortValue();
case "I": return ((Number)v).intValue();
case "F": return ((Number)v).floatValue();
case "D": return ((Number)v).doubleValue();
case "J": return ((Number)v).longValue();
case "C": return (char)((Number)v).intValue();
}
return v;
}
static class AV {
public AnnotationNode visitAnnotation(final String desc, final boolean visible) {
return null;
};
public AnnotationNode visitParameterAnnotation(final int parameter, final String desc, final boolean visible) {
return null;
}
}
AV cnv = new AV() {
public AnnotationNode visitAnnotation(final String desc, final boolean visible) {
return (AnnotationNode) cn.visitAnnotation(desc, visible);
}
};
AV fnv = new AV() {
public AnnotationNode visitAnnotation(final String desc, final boolean visible) {
return (AnnotationNode) fn.visitAnnotation(desc, visible);
}
};
AV mnv = new AV() {
public AnnotationNode visitAnnotation(final String desc, final boolean visible) {
return (AnnotationNode) mn.visitAnnotation(desc, visible);
}
public AnnotationNode visitParameterAnnotation(final int parameter, final String desc, final boolean visible) {
return (AnnotationNode) mn.visitParameterAnnotation(parameter, desc, visible);
}
};
private void visitOP0(int op){
if(op>=26&&op<=45){ // xload_y
int x=op-26;
mn.visitVarInsn(ILOAD+x/4,x\%4);
}else if(op>=59&&op<=78){ // xstore_y
int x=op-26;
mn.visitVarInsn(ISTORE+x/4,x\%4);
}else{
mn.visitInsn(op);
}
}
private void visitIOP(int op, int a){
// xstore
// xload
if(op>=21&&op<=58){
mn.visitVarInsn(op,a);
} else {
// xipush
mn.visitIntInsn(op,a);
}
}
private void visitJOP(int op, Label label){
mn.visitJumpInsn(op,label);
}
private void visitIIOP(int op, int a, int b){
mn.visitIincInsn(a,b);
}
private Label getLabel(String name){
Label label=labelMap.get(name);
if(label==null){
label= new Label();
labelMap.put(name,label);
}
return label;
}
public void accept(ClassVisitor cv) throws RecognitionException{
sFile();
cn.accept(cv);
}
public ClassNode parse() throws RecognitionException {
sFile();
ClassNode cn=this.cn;
reset0();
return cn;
}
AV currentAv;
AnnotationNode currentAnnotationVisitor;
}
fragment
INT_NENT: ('+'|'-')? (
'0'
| ('1'..'9') ('0'..'9')*
| '0' ('0'..'7')+
| ('0x'|'0X') HEX_DIGIT+
);
fragment
FLOAT_NENT
: ('+'|'-')?( ('0'..'9')+ '.' ('0'..'9')* EXPONENT?
| '.' ('0'..'9')+ EXPONENT?
| ('0'..'9')+ EXPONENT)
;
fragment
F_FLOAT : ('f'|'F') ('l'|'L')('o'|'O')('a'|'A')('t'|'T');
fragment
F_DOUBLE :('d'|'D')('o'|'O')('u'|'U')('b'|'B')('l'|'L')('e'|'E');
fragment
F_NAN : ('N'|'n') ('A'|'a') ('N'|'n');
fragment
F_INFINITY: ('I'|'i') ('N'|'n') ('F'|'f') ('I'|'i') ('N'|'n') ('I'|'i') ('T'|'t') ('Y'|'y') ;
FLOAT : ((('0'..'9')+|FLOAT_NENT) ('f'|'F'))
| ('+'|'-')F_FLOAT F_INFINITY
| '+' F_FLOAT F_NAN
;
DOUBLE : FLOAT_NENT ('d'|'D')?
| ('0'..'9')+ ('d'|'D')
| ('+'|'-') F_DOUBLE F_INFINITY
| '+' F_DOUBLE F_NAN
;
LONG : INT_NENT ('L'|'l');
INT : INT_NENT;
COMMENT
: ';' ~('\n'|'\r')* '\r'? '\n' {$channel=HIDDEN;}
;
WS : ( ' '
| '\t'
| '\r'
| '\n'
) {$channel=HIDDEN;}
;
STRING
: '"' ( ESC_SEQ | ~('\\'|'"') )* '"'
;
DSTRING
: '\'' ( ESC_SEQ | ~('\\'|'\'') )* '\''
;
fragment
EXPONENT : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;
fragment
HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ;
fragment
ESC_SEQ
: '\\' ('b'|'t'|'n'|'f'|'r'|'\''|'\"'|'\\')
| '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
| '\\' ('0'..'3') ('0'..'7') ('0'..'7')
| '\\' ('0'..'7') ('0'..'7')
| '\\' ('0'..'7')
;
VOID_TYPE:'V';
fragment
FRAGMENT_PRIMITIVE_TYPE:'B'|'Z'|'S'|'C'|'I'|'F'|'J'|'D';
fragment
FRAGMENT_OBJECT_TYPE: 'L' (ESC_SEQ |~(';'|':'|'\\'|' '|'\n'|'\t'|'\r'|'('|')'))+ ';' ;
METHOD_DESC_WITHOUT_RET: '(' ('['*(FRAGMENT_PRIMITIVE_TYPE|FRAGMENT_OBJECT_TYPE))* ')';
OBJECT_TYPE: 'L' (ESC_SEQ |~(';'|':'|'\\'|' '|'\n'|'\t'|'\r'|'('|')'))+ ';' ;
ACC: 'public' | 'private' | 'protected' | 'static' | 'final' | 'synchronized' | 'bridge' | 'varargs' | 'native' |
'abstract' | 'strictfp' | 'synthetic' | 'constructor' | 'interface' | 'enum' |
'annotation' | 'volatile' | 'transient' | 'declared-synchronized' | 'super' | 'strict';
ANNOTATION_VISIBLITY: 'visible' | 'invisible' ;
METHOD_ANNOTATION_VISIBLITY: 'visibleparam' | 'invisibleparam';
INNER : 'inner';
OUTTER : 'outer';
OP0 : 'nop'|'monitorenter'|'monitorexit'|'pop2'|'pop'
| 'iconst_m1'
|('a'|'i')'const_' ('0'..'5')
|('d'|'l')'const_' ('0'..'1')
|'fconst_' ('0'..'2')
|'aconst_null'
|('a'|'d'|'f'|'i'|'l')? 'return'
|('a'|'d'|'f'|'i'|'l') ('store'|'load') '_' ('0'..'3')
|('a'|'b'|'c'|'d'|'f'|'i'|'l') ('astore'|'aload')
|'dcmpg'|'dcmpl' | 'lcmp' |'fcmpg'|'fcmpl'
|'athrow'
|('i'|'f'|'d'|'l')('add'|'div'|'sub'|'mul'|'rem'|'shl'|'shr'|'ushr'|'and'|'or'|'xor'|'neg')
|'arraylength'
|'dup'|'dup2'|'dup_x2'|'dup2_x2'|'dup2_x1'
|'swap'
|'i2b' | 'i2c' |'i2d' | 'i2f' | 'i2s' | 'i2l'
| 'f2d' | 'f2i' | 'f2l'
| 'd2f' | 'd2i' | 'd2l'
| 'l2d' | 'l2f' | 'l2i'
;
IOP : ('a'|'d'|'f'|'i'|'l') 'load'
| ('a'|'d'|'f'|'i'|'l') 'store'
|'bipush'|'sipush'
;
IIOP : 'iinc'
;
JOP : 'goto'
| 'jsr'
| 'if' ('null'|'nonnull'|'eq'|'ne'|'gt'|'ge'|'lt'|'le')
| 'if_' ('a'|'i') 'cmp' ('eq'|'ne'|'gt'|'ge'|'lt'|'le')
;
LDC : 'ldc'|'ldc_w'|'ldc2_w'
;
XFIELD : 'getstatic'|'putstatic'|'getfield'|'putfield';
XNEWARRAY: 'newarray' ;
XTYPE : 'checkcast'|'instanceof'|'new'|'anewarray'
;
MULTIANEWARRAY
: 'multianewarray'
;
LOOKUPSWITCH: 'lookupswitch';
TABLESWITCH: 'tableswitch';
XINVOKE : 'invokestatic'
| 'invokevirtual'
| 'invokespecial'
;
INVOKEINTERFACE :
'invokeinterface'
;
INVOKEDYNAMIC
: 'invokedynamic';
HIGH : 'high';
DEFAULT : 'default';
FROM : 'from';
TO : 'to';
USING : 'using';
STACK : 'stack';
LOCALS : 'locals';
WBOOLEAN: 'boolean';
WBYTE: 'byte';
WSHORT: 'short';
WCHAR: 'char';
WINTEGER: 'int';
WFLOAT: 'float';
WLONG: 'long';
WDOUBLE: 'double';
fragment
F_ID_FOLLOWS: ESC_SEQ| ~('\\'|'\r'|'\n'|'\t'|' '|':'|'-'|'='|','|'{'|'}'|'('|')');
ID : FRAGMENT_PRIMITIVE_TYPE F_ID_FOLLOWS+
| ESC_SEQ F_ID_FOLLOWS*
| ~(FRAGMENT_PRIMITIVE_TYPE| '0'..'9'| '\\' | '\r' | '\n' | '\t' | '\'' | '\"' | ' ' | ':' | '-' | '=' | '.' | ',' | '&' | '@' | '/' | '{'|'['|']'|'}'|'('|')') F_ID_FOLLOWS*
;
PARRAY_TYPE
: '['+ FRAGMENT_OBJECT_TYPE
| '[' '['+ FRAGMENT_PRIMITIVE_TYPE
;
AT : '@';
AND : '&';
UP_Z : 'Z';
UP_B : 'B';
UP_S : 'S';
UP_C : 'C';
UP_I : 'I';
UP_F : 'F';
UP_D : 'D';
UP_J : 'J';
ARRAY_Z : '[Z';
ARRAY_B : '[B';
ARRAY_S : '[S';
ARRAY_C : '[C';
ARRAY_I : '[I';
ARRAY_F : '[F';
ARRAY_D : '[D';
ARRAY_J : '[J';
ARRAY_LOW_E : '[e';
ARRAY_LOW_S : '[s';
ARRAY_LOW_C : '[c';
ARRAY_AT : '[@';
ARRAY_AND : '[&';
LEFT_PAREN: '(';
RIGHT_PAREN: ')';
sFile : { reset0(); currentAv=cnv; }
sHead+ (sAnnotation|sVisibiltyAnnotation)* (sField|sMethod)*
;
sHead : '.bytecode' ( a=INT { int v=parseInt($a.text); cn.version=versions[v>=45?v-45:v];}
|a=DOUBLE {double v=parseDouble($a.text); cn.version=versions[(int)(v<2.0?(v*10)\%10:(v-44))]; }
)
| '.source' aa4=sAnyIdOrString { cn.sourceFile=$aa4.str; }
| '.class' i=sAccList {cn.access|=$i.acc; if ((cn.access & Opcodes.ACC_INTERFACE) == 0) {cn.access |= Opcodes.ACC_SUPER;} else { cn.access &= ~Opcodes.ACC_SUPER; } } a1=sInternalNameOrDesc { cn.name=Type.getType($a1.desc).getInternalName(); }
| '.interface' i=sAccList {cn.access|=ACC_INTERFACE|$i.acc;} a1=sInternalNameOrDesc { cn.name=Type.getType($a1.desc).getInternalName(); }
| '.super' a1=sInternalNameOrDescACC { cn.superName=Type.getType($a1.desc).getInternalName(); }
| '.implements' a1=sInternalNameOrDescACC { if(cn.interfaces==null){cn.interfaces=new ArrayList<>();} cn.interfaces.add(Type.getType($a1.desc).getInternalName()); }
| '.enclosing method' ownerAndName=sOwnerAndName {tmp=null;} (b=sMethodDesc{tmp=$b.text;})? {cn.visitOuterClass($ownerAndName.ownerInternalName,$ownerAndName.memberName,tmp);}
| sDeprecateAttr { cn.access|=ACC_DEPRECATED; }
| '.debug' a=STRING { cn.sourceDebug=unEscapeString($a.text); }
| '.attribute' sId STRING { System.err.println("ignore .attribute"); }
| '.inner class' (i=sAccList sId{tmpInt=$i.acc;})? {tmp=null;tmp2=null;} ('inner' a3=sId{tmp=$a3.text;})? ('outer' a4=sId{tmp2=$a4.text;})? { cn.visitInnerClass(null,tmp2,tmp,tmpInt); }
| '.no_super' {cn.superName=null;}
| '.class_attribute' sId STRING { System.err.println("ignore .class_attribute"); }
| '.enclosing_method_attr' a=STRING b1=STRING c=STRING {cn.visitOuterClass($a.text,$b1.text,$c.text);}
| '.inner_class_attr' ('.inner_class_spec_attr' a=STRING b2=STRING i=sAccList '.end' '.inner_class_spec_attr' { cn.visitInnerClass(null,unEscape($a.text),unEscape($b2.text),i); } )* '.end' '.inner_class_attr'
| s=sSigAttr { cn.signature=$s.sig; }
| sSynthetic {cn.access|=ACC_SYNTHETIC;}
;
sSigAttr returns[String sig]: ('.signature_attr' | '.signature') a=STRING{ $sig=unEscapeString($a.text); };
sDeprecateAttr: '.deprecated';
sSynthetic
: '.synthetic'
;
sArrayType
: PARRAY_TYPE|ARRAY_Z|ARRAY_B|ARRAY_S|ARRAY_C|ARRAY_I|ARRAY_F|ARRAY_D|ARRAY_J
;
sClassDesc
: sArrayType|OBJECT_TYPE|UP_Z|UP_B|UP_S|UP_C|UP_I|UP_J|UP_D|UP_F
;
sId : ID|AT|AND|UP_Z|UP_B|UP_S|UP_C|UP_I|UP_F|UP_D|UP_J|ANNOTATION_VISIBLITY|METHOD_ANNOTATION_VISIBLITY|INNER|OUTTER
| IIOP|IOP|JOP|OP0|LDC|XFIELD|XTYPE|XINVOKE|INVOKEINTERFACE|MULTIANEWARRAY|LOOKUPSWITCH|TABLESWITCH|DEFAULT|FROM|TO|USING|STACK|LOCALS|HIGH|INVOKEDYNAMIC|VOID_TYPE
| WBOOLEAN| WBYTE | WSHORT|WCHAR|WINTEGER|WLONG|WFLOAT|WDOUBLE |XNEWARRAY
;
sWord : sId ;
sAnnotation
: '.annotation' (b=ANNOTATION_VISIBLITY aInternalOrDesc=sInternalNameOrDescACC { currentAnnotationVisitor= currentAv.visitAnnotation($aInternalOrDesc.desc,!$b.text.contains("invisible")); } |
b=METHOD_ANNOTATION_VISIBLITY c=INT a=sId {currentAnnotationVisitor=currentAv.visitParameterAnnotation(parseInt($c.text),$a.text,!$b.text.contains("invisible"));}
)
(sAnnotationElement* '.end annotation')?
;
sVisibiltyAnnotation
: {boolean visible=false;} ('.runtime_visible_annotation' {visible=true;}|'.runtime_invisible_annotation'{visible=false;}) a=STRING { currentAnnotationVisitor= currentAv.visitAnnotation(unEscape($a.text),visible); }
sAnnotationSoot*
'.end' '.annotation_attr'
;
sAnnotationSoot
: '.annotation'
(t=sAnnotationElementSoot {currentAnnotationVisitor.visit($t.nn,$t.v);} )*
'.end' '.annotation'
;
sAnnotationElementSoot returns[String nn,Object v]
:'.elem' ('.bool_kind' a=STRING b=INT {$nn=unEscapeString($a.text); $v=0!=parseInt($b.text);}
| '.short_kind' a=STRING b=INT {$nn=unEscapeString($a.text); $v=(short)parseInt($b.text);}
| '.byte_kind' a=STRING b=INT {$nn=unEscapeString($a.text); $v=(byte)parseInt($b.text);}
| '.char_kind' a=STRING b=INT {$nn=unEscapeString($a.text); $v=(char)parseInt($b.text);}
| '.int_kind' a=STRING b=INT {$nn=unEscapeString($a.text); $v=parseInt($b.text);}
| '.long_kind' a=STRING b=(INT|LONG) {$nn=unEscapeString($a.text); $v=parseLong($b.text);}
| '.float_kind' a=STRING b=INT {$nn=unEscapeString($a.text); $v=parseFloat($b.text);}
| '.doub_kind' a=STRING b=(INT|LONG) {$nn=unEscapeString($a.text); $v=parseDouble($b.text);}
| '.str_kind' a=STRING b=STRING {$nn=unEscapeString($a.text); $v=unEscapeString($b.text);}
| '.enum_kind' a=STRING b=STRING {$nn=unEscapeString($a.text); String on[]=parseOwnerAndName($b.text);$v=new String[]{on[0],on[1]};}
| '.cls_kind' a=STRING b=STRING {$nn=unEscapeString($a.text); $v=Type.getType(unEscapeString($b.text));}
| '.arr_kind' a=STRING {List<Object> array=new ArrayList<>();} (t=sAnnotationElementSoot{array.add($t.v);})* '.end' '.arr_elem' {$nn=unEscapeString($a.text); $v=array;}
| '.ann_kind' a=STRING q=sSubannotationSoot '.end' '.annot_elem' {$nn=unEscapeString($a.text); $v=$q.v;})
;
sSubannotationSoot returns[AnnotationNode v]
: '.annotation' a=STRING { $v=new AnnotationNode(unEscapeString($a.text)); }
(t=sAnnotationElementSoot {$v.visit($t.nn,$t.v);} )*
'.end' '.annotation'
;
sAnnotationElement @init{List<Object> array = new ArrayList<Object>(); AnnotationNode _t= currentAnnotationVisitor;}
: a=sId (
xid=ID { if(!"e".contains($xid.text)){ throw new RecognitionException(input);} } c=OBJECT_TYPE '=' b=sWord { _t.visit($a.text,new String[]{$c.text,$b.text}); }
| AT b2=OBJECT_TYPE '=' { currentAnnotationVisitor=new AnnotationNode($b2.text);} sSubannotation { _t.visit($a.text,currentAnnotationVisitor); }
| xid=ID { if(!"c".contains($xid.text)){ throw new RecognitionException(input);} } '=' b1=sClassDesc { currentAnnotationVisitor.visit($a.text,Type.getType($b1.text)); }
| xid=ID { if(!"s".contains($xid.text)){ throw new RecognitionException(input);} } '=' b3=STRING { currentAnnotationVisitor.visit($a.text,unEscapeString($b3.text)); }
| UP_B '=' b4=INT { currentAnnotationVisitor.visit($a.text,(byte)parseInt($b4.text)); }
| UP_Z '=' b5=INT { currentAnnotationVisitor.visit($a.text,0!=parseInt($b5.text)); }
| UP_S '=' b6=INT { currentAnnotationVisitor.visit($a.text,(short)parseInt($b6.text)); }
| UP_C '=' b7=INT { currentAnnotationVisitor.visit($a.text,(char)parseInt($b7.text)); }
| UP_I '=' b8=INT { currentAnnotationVisitor.visit($a.text,parseInt($b8.text)); }
| UP_J '=' b9=(INT|LONG) { currentAnnotationVisitor.visit($a.text,parseLong($b9.text)); }
| UP_F '=' b10=(INT|FLOAT|DOUBLE) { currentAnnotationVisitor.visit($a.text,parseFloat($b10.text)); }
| UP_D '=' b11=(INT|FLOAT|DOUBLE) { currentAnnotationVisitor.visit($a.text,parseDouble($b11.text)); }
| ARRAY_B '=' (b12=INT {array.add((byte)parseInt($b12.text));} )+ { currentAnnotationVisitor.visit($a.text,array); }
| ARRAY_Z '=' (b13=INT {array.add(0!=parseInt($b13.text));} )+ { currentAnnotationVisitor.visit($a.text,array); }
| ARRAY_S '=' (b14=INT {array.add((short)parseInt($b14.text));} )+ { currentAnnotationVisitor.visit($a.text,array); }
| ARRAY_C '=' (b15=INT {array.add((char)parseInt($b15.text));} )+ { currentAnnotationVisitor.visit($a.text,array); }
| ARRAY_I '=' (b16=INT {array.add(parseInt($b16.text));} )+ { currentAnnotationVisitor.visit($a.text,array); }
| ARRAY_J '=' (b17=(INT|LONG) {array.add(parseLong($b17.text));} )+ { currentAnnotationVisitor.visit($a.text,array); }
| ARRAY_F '=' (b18=(INT|FLOAT|DOUBLE) {array.add(parseFloat($b18.text));} )+ { currentAnnotationVisitor.visit($a.text,array); }
| ARRAY_D '=' (b19=(INT|DOUBLE) {array.add(parseDouble($b19.text));} )+ { currentAnnotationVisitor.visit($a.text,array); }
| ARRAY_LOW_E c=OBJECT_TYPE '=' ((b1=sWord{ array.add(new String[]{$c.text,unEscape($b1.text)}); }|b2=STRING{ array.add(new String[]{$c.text,unEscapeString($b2.text)}); }|b3=DSTRING{ array.add(new String[]{$c.text,unEscapeString($b3.text)}); }) )+ { currentAnnotationVisitor.visit($a.text,array); }
| ARRAY_AND b20=OBJECT_TYPE '=' ARRAY_AT '=' ({currentAnnotationVisitor=new AnnotationNode($b20.text);} sSubannotation{ array.add(currentAnnotationVisitor); })+ { currentAnnotationVisitor.visit($a.text,array); }
| ARRAY_LOW_C '=' (b=sClassDesc {array.add(Type.getType($b.text));} )+ { currentAnnotationVisitor.visit($a.text,array); }
| ARRAY_LOW_S '=' (b21=STRING {array.add(unEscapeString($b21.text));})+ { currentAnnotationVisitor.visit($a.text,array); }
)
{ currentAnnotationVisitor=_t; }
;
sSubannotation
: '.annotation'
sAnnotationElement*
'.end annotation'
;
sAccList returns[int acc]: {$acc=0;} ( a=ACC {$acc|=getAcc($a.text);})* ;
sMemberName returns[String name]: a=sId {$name=unEscape($a.text);} | b=STRING {$name=unEscapeString($b.text);}| c=DSTRING {$name=unEscapeString($c.text);};
sField @init {
if(cn.fields==null){
cn.fields=new ArrayList<>();
}
currentAv=fnv;
fn=new FieldNode(0,null,null,null,null);
cn.fields.add(fn);
}
: '.field' i=sAccList n=sMemberName t=sClassDesc { fn.access|=i;fn.name=$n.name;fn.desc=unEscape($t.text); }
( '=' (a=STRING {fn.value=parseValue(fn.desc,unEscapeString($a.text));}
|a1=INT {fn.value=parseValue(fn.desc,parseInt($a1.text));}
|a2=LONG {fn.value=parseValue(fn.desc,parseLong($a2.text));}
|a3=FLOAT {fn.value=parseValue(fn.desc,parseFloat($a3.text));}
|a4=DOUBLE {fn.value=parseValue(fn.desc,parseDouble($a4.text));}
|a5=sClassDesc {fn.value=parseValue(fn.desc,Type.getType(unEscape($a5.text)));}
)
)?
(
s=sSigAttr{fn.signature=$s.sig;}
|sDeprecateAttr{ fn.access|=ACC_DEPRECATED; }
|sSynthetic {cn.access|=ACC_SYNTHETIC;}
|sVisibiltyAnnotation
|sAnnotation
)*
('.end field'| '.end' '.field')?
('.field_attribute' sId STRING {System.err.println("ignore .field_attribute");})*
;
sMethod @init{
if(cn.methods==null){
cn.methods=new ArrayList<>();
}
currentAv=mnv;
mn=new MethodNode(ASM4);
cn.methods.add(mn);
labelMap.clear();
if(mn.exceptions==null){
mn.exceptions=new ArrayList<>();
}
if(mn.tryCatchBlocks==null){
mn.tryCatchBlocks=new ArrayList<>();
}
}
: '.method' i=sAccList n=sMemberName t=sMethodDesc {mn.access|=i;mn.name=$n.name;mn.desc=unEscape($t.text);}
(s=sSigAttr{mn.signature=$s.sig;}
|sDeprecateAttr{ cn.access|=ACC_DEPRECATED; }
|sSynthetic {cn.access|=ACC_SYNTHETIC;}
|sVisibiltyAnnotation
|sAnnotation
|'.throws' at=sInternalNameOrDesc { mn.exceptions.add(Type.getType($at.desc).getInternalName()); }
|'.annotation_default' (t=sAnnotationElementSoot {currentAnnotationVisitor=(AnnotationNode)mn.visitAnnotationDefault();} )? '.end' '.annotation_default'
|'.param' ('.runtime_invisible_annotation'|'.runtime_visible_annotation') {int index=0;}
({boolean visible=false;} ('.runtime_visible_annotation' {visible=true;}|'.runtime_invisible_annotation'{visible=false;}) a1=STRING
{ currentAnnotationVisitor= currentAv.visitParameterAnnotation(index,unEscapeString($a1.text),visible); }
sAnnotationSoot*
'.end' '.annotation_attr' {index++;}
)*
'.end' '.param'
| code
)*
'.end method'
('.method_attribute' sId STRING {System.err.println("ignore method_attribute");})*
;
sLabel : ACC|ID|UP_Z|UP_B|UP_S|UP_C|UP_I|UP_F|UP_D|UP_J|ANNOTATION_VISIBLITY|METHOD_ANNOTATION_VISIBLITY|INNER|OUTTER
;
code
: a=OP0 { line($a.line); visitOP0(getOp($a.text)); }
| a=IOP b=INT { line($a.line); visitIOP(getOp($a.text),parseInt($b.text)); }
| a=IIOP b=INT c=INT { line($a.line); visitIIOP(getOp($a.text),parseInt($b.text),parseInt($c.text)); }
| a=LDC {line($a.line); } ( c=INT {mn.visitLdcInsn(parseInt($c.text));}
|c=LONG {mn.visitLdcInsn(parseLong($c.text));}
|c=FLOAT {mn.visitLdcInsn(parseFloat($c.text));}
|c=DOUBLE {mn.visitLdcInsn(parseDouble($c.text));}
|c=STRING {mn.visitLdcInsn(unEscapeString($c.text));}
|eTV=sInternalNameOrDescNoString {mn.visitLdcInsn(Type.getType($eTV.desc));}
)
| a=XFIELD efo=sFieldObject { line($a.line); mn.visitFieldInsn(getOp($a.text),$efo.ownerInternalName,$efo.memberName,$efo.type); }
| a=XNEWARRAY {line($a.line); } (
WBOOLEAN{mn.visitIntInsn(NEWARRAY,T_BOOLEAN);}
|WBYTE{mn.visitIntInsn(NEWARRAY,T_BYTE);}
|WSHORT{mn.visitIntInsn(NEWARRAY,T_SHORT);}
|WCHAR{mn.visitIntInsn(NEWARRAY,T_CHAR);}
|WINTEGER{mn.visitIntInsn(NEWARRAY,T_INT);}
|WLONG{mn.visitIntInsn(NEWARRAY,T_LONG);}
|WFLOAT{mn.visitIntInsn(NEWARRAY,T_FLOAT);}
|WDOUBLE{mn.visitIntInsn(NEWARRAY,T_DOUBLE);})
| a=XTYPE ffTV=sInternalNameOrDescACC {
line($a.line);
mn.visitTypeInsn(getOp($a.text),Type.getType($ffTV.desc).getInternalName());
}
| a=JOP z=sLabel { line($a.line); visitJOP(getOp($a.text),getLabel($z.text)); }
| a=XINVOKE e1=sMethodObject {line($a.line);
mn.visitMethodInsn(getOp($a.text),$e1.ownerInternalName,$e1.memberName,$e1.desc);
}
| a=INVOKEINTERFACE e2=sMethodObject INT? {line($a.line);
mn.visitMethodInsn(getOp($a.text),$e2.ownerInternalName,$e2.memberName,$e2.desc);
}
| a=INVOKEDYNAMIC e3=sMethodObject sId sMethodDesc '(' sInvokeDynamicE (',' sInvokeDynamicE)* ')' {line($a.line); if(1==1) throw new RuntimeException("not support Yet!");}
| a=MULTIANEWARRAY ff=sClassDesc c=INT {line($a.line); mn.visitMultiANewArrayInsn(unEscape($ff.text),parseInt($c.text)); }
| z=sLabel ':' { Label label=getLabel($z.text); mn.visitLabel(label); if(rebuildLine) {mn.visitLineNumber($z.start.getLine(),label);}
}
| '.catch' e=sId 'from' z1=sLabel 'to' z2=sLabel 'using' z3=sLabel { String type="all".equals($e.text)?null:unEscape($e.text); mn.visitTryCatchBlock(getLabel($z1.text),getLabel($z2.text),getLabel($z3.text),type); }
| '.limit' 'stack' ('?' { mn.maxStack=-1; } | i1=INT { mn.maxStack=parseInt($i1.text); })
| '.limit' 'locals' ('?' {mn.maxLocals=-1;}| i1=INT { mn.maxLocals=parseInt($i1.text);})
| '.code_attribute' sId STRING { System.err.println("ignore .code_attribute"); }
| '.line' b=INT { if(!rebuildLine) { Label label=new Label(); mn.visitLabel(label); mn.visitLineNumber(parseInt($b.text),label); } }
| '.var' var=INT 'is' mber=sMemberName desc=sClassDesc ('signature' sig=STRING)? 'from' z1=sLabel 'to' z2=sLabel { mn.visitLocalVariable($mber.name,unEscape($desc.text),unEscapeString($sig.text),getLabel($z1.text),getLabel($z2.text),parseInt($var.text)); }
| sSwitch
;
sInvokeDynamicE
: METHOD_DESC_WITHOUT_RET (INT|LONG|FLOAT|DOUBLE|STRING)
;
sMethodDesc
: METHOD_DESC_WITHOUT_RET (sClassDesc|VOID_TYPE)
;
sSwitch @init {List<Integer> keys=null;List<Label> labels=null;Label defaultLabel=null;}
: a=LOOKUPSWITCH { keys=new ArrayList<>(); labels=new ArrayList<>(); } (c=INT ':' z=sLabel { keys.add(parseInt($c.text)); labels.add(getLabel($z.text)); })* (DEFAULT ':' z=sLabel { defaultLabel=getLabel($z.text); }) {
line($a.line);
int ts[]=new int[keys.size()];
for(int i=0;i<keys.size();i++){
ts[i]=keys.get(i);
}
mn.visitLookupSwitchInsn(defaultLabel, ts, labels.toArray(new Label[labels.size()]));
}
| a=TABLESWITCH { labels=new ArrayList<>(); } c=INT ';' 'high' '=' d=INT (z=sLabel {labels.add(getLabel($z.text));} )* (DEFAULT ':' z=sLabel {defaultLabel=getLabel($z.text);}) {
line($a.line); mn.visitTableSwitchInsn(parseInt($c.text),parseInt($c.text)+labels.size()-1,defaultLabel,labels.toArray(new Label[labels.size()]));
}
| a=TABLESWITCH { labels=new ArrayList<>(); } c=INT (z=sLabel {labels.add(getLabel($z.text));} )* (DEFAULT ':' z=sLabel {defaultLabel=getLabel($z.text);}) {
line($a.line); mn.visitTableSwitchInsn(parseInt($c.text),parseInt($c.text)+labels.size()-1,defaultLabel,labels.toArray(new Label[labels.size()]));
}
;
sInternalNameOrDesc returns[String desc]
: (a=sArrayType { $desc=unEscape($a.text); }|b=OBJECT_TYPE { $desc=unEscape($b.text); })
| c=sId { $desc= "L"+unEscape($c.text)+";"; }
| DSTRING { $desc= "L"+unEscapeString($DSTRING.text)+";"; }
| STRING { $desc= "L"+unEscapeString($STRING.text)+";"; }
;
sInternalNameOrDescACC returns[String desc]
: (a=sArrayType { $desc=unEscape($a.text); }|b=OBJECT_TYPE { $desc=unEscape($b.text); })
| c=sAnyId { $desc= "L"+unEscape($c.text)+";"; }
| DSTRING { $desc= "L"+unEscapeString($DSTRING.text)+";"; }
| STRING { $desc= "L"+unEscapeString($STRING.text)+";"; }
;
sInternalNameOrDescNoString returns[String desc]
: (a=sArrayType { $desc=unEscape($a.text); }|b=OBJECT_TYPE { $desc=unEscape($b.text); })
| c=sAnyId { $desc= "L"+unEscape($c.text)+";"; }
;
sAnyId
: ACC | sId
;
sAnyIdOrString returns[String str]
: sAnyId { $str=unEscape($sAnyId.text);}
| STRING { $str=unEscapeString($STRING.text); }
| DSTRING { $str=unEscapeString($DSTRING.text); }
;
sOwnerAndName returns[String ownerInternalName, String memberName]
: a=sArrayType '/' x=sAnyId { if($x.text.contains("/")){ throw new RecognitionException(input);} $ownerInternalName=unEscape($a.text); $memberName=unEscape($x.text); }
| b=sClassDesc '->' x=sAnyId { if($x.text.contains("/")){ throw new RecognitionException(input);} $ownerInternalName=Type.getType(unEscape($b.text)).getInternalName(); $memberName=unEscape($x.text); }
| c=sId { String cstr=$c.text; int idx=cstr.lastIndexOf('/'); if(idx<=0) { throw new RecognitionException(input); } $ownerInternalName=unEscape(cstr.substring(0,idx)); $memberName=unEscape(cstr.substring(idx+1)); }
;
sMethodObject returns[String ownerInternalName, String memberName, String desc]
: ( a=sArrayType '/' x=sAnyId { if($x.text.contains("/")){ throw new RecognitionException(input);} $ownerInternalName=unEscape($a.text); $memberName=unEscape($x.text); }
| b=sClassDesc '->' x=sAnyId { if($x.text.contains("/")){ throw new RecognitionException(input);} $ownerInternalName=Type.getType(unEscape($b.text)).getInternalName(); $memberName=unEscape($x.text); }
| c=sId { String cstr=$c.text; int idx=cstr.lastIndexOf('/'); if(idx<=0) { throw new RecognitionException(input); } $ownerInternalName=unEscape(cstr.substring(0,idx)); $memberName=unEscape(cstr.substring(idx+1)); }
)
d=sMethodDesc { $desc=unEscape($d.text); }
;
sFieldObject returns[String ownerInternalName, String memberName, String type]
: ( a=sArrayType '/' x=sAnyId { if($x.text.contains("/")){ throw new RecognitionException(input);} $ownerInternalName=unEscape($a.text); $memberName=unEscape($x.text); }
| b=sClassDesc '->' x=sAnyId ':' { if($x.text.contains("/")){ throw new RecognitionException(input);} $ownerInternalName=Type.getType(unEscape($b.text)).getInternalName(); $memberName=unEscape($x.text); }
| c=sId { String cstr=$c.text; int idx=cstr.lastIndexOf('/'); if(idx<=0) { throw new RecognitionException(input); } $ownerInternalName=unEscape(cstr.substring(0,idx)); $memberName=unEscape(cstr.substring(idx+1)); }
)
b=sClassDesc { $type=unEscape($b.text); }
;
================================================
FILE: d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jar2JasminCmd.java
================================================
/*
* dex2jar - Tools to work with android .dex and java .class files
* Copyright (c) 2009-2012 Panxiaobo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.googlecode.d2j.jasmin;
import com.googlecode.dex2jar.tools.BaseCmd;
import com.googlecode.dex2jar.tools.BaseCmd.Syntax;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.tree.ClassNode;
import java.io.*;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
import java.nio.file.FileSystem;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
@Syntax(cmd = "d2j-jar2jasmin", syntax = "[options] <jar>", desc = "Disassemble .class in jar file to jasmin file", onlineHelp = "https://sourceforge.net/p/dex2jar/wiki/Jasmin")
public class Jar2JasminCmd extends BaseCmd {
@Opt(opt = "d", longOpt = "debug", hasArg = false, description = "disassemble debug info")
private boolean debugInfo = false;
@Opt(opt = "f", longOpt = "force", hasArg = false, description = "force overwrite")
private boolean forceOverwrite = false;
@Opt(opt = "o", longOpt = "output", description = "output dir of .j files, default is $current_dir/[jar-name]-jar2jasmin/", argName = "out-dir")
private Path output;
@Opt(opt = "e", longOpt = "encoding", description = "encoding for .j files, default is UTF-8", argName = "enc")
private String encoding = "UTF-8";
public static void main(String... args) {
new Jar2JasminCmd().doMain(args);
}
@Override
protected void doCommandLine() throws Exception {
if (remainingArgs.length != 1) {
usage();
return;
}
Path jar = new File(remainingArgs[0]).toPath().toAbsolutePath();
if (!Files.exists(jar)) {
System.err.println(jar + " is not exists");
usage();
return;
}
if (output == null) {
output = new File(getBaseName(jar) + "-jar2jasmin/").toPath();
}
if (Files.exists(output) && !forceOverwrite) {
System.err.println(output + " exists, use --force to overwrite");
usage();
return;
}
System.out.println("disassemble " + jar + " -> " + output);
if (!output.toString().endsWith(".jar") && !output.toString().endsWith(".apk")) {
disassemble0(jar, output);
} else {
try (FileSystem fs = createZip(output)) {
disassemble0(jar, fs.getPath("/"));
}
}
}
private void disassemble0(Path in, final Path output) throws IOException, URISyntaxException {
if (Files.isDirectory(in)) { // a dir
travelFileTree(in, output);
} else if (in.toString().endsWith(".class")) {
disassemble1(in, output);
} else {
try (FileSystem fs = openZip(in)) {
travelFileTree(fs.getPath("/"), output);
}
}
}
private void travelFileTree(Path in, final Path output) throws IOException {
Files.walkFileTree(in, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
if (file.getFileName().toString().endsWith(".class")) {
disassemble1(file, output);
}
return super.visitFile(file, attrs);
}
});
}
private void disassemble1(Path file, Path output) throws IOException {
ClassReader r = new ClassReader(Files.readAllBytes(file));
Path jFile = output.resolve(r.getClassName().replace('.', '/') + ".j");
createParentDirectories(jFile);
try (BufferedWriter out = Files.newBufferedWriter(jFile, Charset.forName(encoding))) {
PrintWriter pw = new PrintWriter(out);
ClassNode node = new ClassNode();
r.accept(node, (debugInfo ? 0 : ClassReader.SKIP_DEBUG) | ClassReader.EXPAND_FRAMES | ClassReader.SKIP_FRAMES);
new JasminDumper(pw).dump(node);
pw.flush();
}
}
}
================================================
FILE: d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jasmin2JarCmd.java
================================================
/*
* dex2jar - Tools to work with android .dex and java .class files
* Copyright (c) 2009-2012 Panxiaobo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.googlecode.d2j.jasmin;
import com.googlecode.dex2jar.tools.BaseCmd;
import org.antlr.runtime.ANTLRReaderStream;
import org.antlr.runtime.ANTLRStringStream;
import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.RecognitionException;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.ClassNode;
import java.io.*;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
@BaseCmd.Syntax(cmd = "d2j-jasmin2jar", syntax = "[options] <jar>", desc = "Assemble .j files to .class file", onlineHelp = "https://sourceforge.net/p/dex2jar/wiki/Jasmin")
public class Jasmin2JarCmd extends BaseCmd implements Opcodes {
private static int versions[] = { 0, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, 52 // V1_8 ?
, 53 // V1_9 ?
};
@Opt(opt = "g", longOpt = "autogenerate-linenumbers", hasArg = false, description = "autogenerate-linenumbers")
boolean autogenLines = false;
@Opt(opt = "f", longOpt = "force", hasArg = false, description = "force overwrite")
private boolean forceOverwrite = false;
@Opt(opt = "o", longOpt = "output", description = "output .jar file, default is $current_dir/[jar-name]-jasmin2jar.jar", argName = "out-jar-file")
private Path output;
@Opt(opt = "e", longOpt = "encoding", description = "encoding for .j files, default is UTF-8", argName = "enc")
private String encoding = "UTF-8";
@Opt(opt = "d", longOpt = "dump", description = "dump to stdout", hasArg = false)
private boolean dump;
@Opt( longOpt = "no-compute-max", description = "", hasArg = false)
private boolean noComputeMax;
@Opt(opt = "cv", longOpt = "class-version", description = "default .class version, [1~9], default 6 for JAVA6")
private int classVersion = 6;
public static void main(String... args) throws ClassNotFoundException, SecurityException {
new Jasmin2JarCmd().doMain(args);
}
@Override
protected void doCommandLine() throws Exception {
if (remainingArgs.length != 1) {
usage();
return;
}
if (classVersion < 1 || classVersion > 9) {
throw new HelpException("-cv,--class-version out of range, 1-9 is supported.");
}
Path jar = new File(remainingArgs[0]).toPath().toAbsolutePath();
if (!Files.exists(jar)) {
System.err.println(jar + " is not exists");
usage();
return;
}
if (output == null) {
output = new File(getBaseName(jar) + "-jasmin2jar/").toPath();
}
if (Files.exists(output) && !forceOverwrite) {
System.err.println(output + " exists, use --force to overwrite");
usage();
return;
}
System.out.println("assemble " + jar + " -> " + output);
if (!output.toString().endsWith(".jar") && !output.toString().endsWith(".zip")) {
assemble0(jar, output);
} else {
try (FileSystem fs = createZip(output)) {
assemble0(jar, fs.getPath("/"));
}
}
}
private void assemble0(Path in, Path output) throws IOException, URISyntaxException {
if (Files.isDirectory(in)) { // a dir
travelFileTree(in, output);
} else if (in.toString().endsWith(".j")) {
assemble1(in, output);
} else {
try (FileSystem fs = openZip(in)) {
travelFileTree(fs.getPath("/"), output);
}
}
}
private void travelFileTree(Path in, final Path output) throws IOException {
Files.walkFileTree(in, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
if (file.getFileName().toString().endsWith(".j")) {
assemble1(file, output);
}
return super.visitFile(file, attrs);
}
});
}
private void assemble1(Path file, Path output) throws IOException {
try (BufferedReader bufferedReader = Files.newBufferedReader(file, Charset.forName(encoding))) {
ANTLRStringStream is = new ANTLRReaderStream(bufferedReader);
is.name = file.toString();
JasminLexer lexer = new JasminLexer(is);
CommonTokenStream ts = new CommonTokenStream(lexer);
JasminParser parser = new JasminParser(ts);
parser.rebuildLine = autogenLines;
ClassWriter cw = new ClassWriter(noComputeMax?0:ClassWriter.COMPUTE_MAXS);
ClassNode cn = parser.parse();
if (cn.version == 0) {
cn.version = versions[classVersion];
}
if (dump) {
new JasminDumper(new PrintWriter(new OutputStreamWriter(System.out, StandardCharsets.UTF_8), true)).dump(cn);
}
cn.accept(cw);
Path clzFile = output.resolve(cn.name.replace('.', '/') + ".class");
createParentDirectories(clzFile);
Files.write(clzFile, cw.toByteArray());
} catch (RecognitionException e) {
System.err.println("Fail to assemble " + file);
e.printStackTrace();
}
}
}
================================================
FILE: d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/JasminDumper.java
================================================
/***
* ASM: a very small and fast Java bytecode manipulation framework
* Copyright (c) 2000-2005 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.googlecode.d2j.jasmin;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.*;
import org.objectweb.asm.util.Printer;
import java.io.PrintWriter;
import java.util.*;
/**
* <b>get from asm example</b>
* <p>
* Disassembled view of the classes in Jasmin assembler format.
* <p>
* The trace printed when visiting the <tt>Hello</tt> class is the following:
* <p>
* <blockquote>
*
* <pre>
* .bytecode 45.3
* .class public Hello
* .super java/lang/Object
*
* .method public <init>()V
* aload 0
* invokespecial java/lang/Object/<init>()V
* return
* .limit locals 1
* .limit stack 1
* .end method
*
* .method public static main([Ljava/lang/String;)V
* getstatic java/lang/System/out Ljava/io/PrintStream;
* ldc "hello"
* invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
* return
* .limit locals 2
* .limit stack 2
* .end method
* </pre>
*
* </blockquote> where <tt>Hello</tt> is defined by:
* <p>
* <blockquote>
*
* <pre>
* public class Hello {
*
* public static void main(String[] args) {
* System.out.println("hello");
* }
* }
* </pre>
*
* </blockquote>
*
* @author Eric Bruneton
*/
public class JasminDumper implements Opcodes {
private static Set<String> ACCESS_KWS = new HashSet<String>(Arrays
.asList("abstract", "private", "protected", "public", "enum", "final", "interface", "static", "strictfp", "native", "super"));
public JasminDumper(PrintWriter pw) {
this.pw = pw;
}
/**
* The print writer to be used to print the class.
*/
protected PrintWriter pw;
/**
* The label names. This map associate String values to Label keys.
*/
protected final Map<Label, String> labelNames = new HashMap<>();
static void printIdAfterAccess(PrintWriter out, String id) {
if (ACCESS_KWS.contains(id)) {
out.print("\"");
out.print(id);
out.print("\"");
} else {
out.print(id);
}
}
public void dump(ClassNode cn) {
labelNames.clear();
pw.print(".bytecode ");
pw.print(cn.version & 0xFFFF);
pw.print('.');
pw.println(cn.version >>> 16);
println(".source ", cn.sourceFile);
pw.print(".class");
pw.print(access_clz(cn.access));
pw.print(' ');
printIdAfterAccess(pw, cn.name);
pw.println();
if (cn.superName != null) {
pw.print(".super ");
printIdAfterAccess(pw, cn.superName);
pw.println();
}
for (String itf : cn.interfaces) {
pw.print(".implements ");
printIdAfterAccess(pw, itf);
pw.println();
}
if (cn.signature != null) {
println(".signature ", '"' + cn.signature + '"');
}
if (cn.outerClass != null) {
pw.print(".enclosing method ");
pw.print(cn.outerClass);
if (cn.outerMethod != null) {
pw.print('/');
pw.print(cn.outerMethod);
pw.println(cn.outerMethodDesc);
} else {
pw.println();
}
}
if ((cn.access & Opcodes.ACC_DEPRECATED) != 0) {
pw.println(".deprecated");
}
if (cn.visibleAnnotations != null) {
for (AnnotationNode an : cn.visibleAnnotations) {
printAnnotation(an, 1, -1);
}
}
if (cn.invisibleAnnotations != null) {
for (AnnotationNode an : cn.invisibleAnnotations) {
printAnnotation(an, 2, -1);
}
}
println(".debug ", cn.sourceDebug == null ? null : '"' + cn.sourceDebug + '"');
for (InnerClassNode in : cn.innerClasses) {
pw.print(".inner class");
pw.print(access_clz(in.access & (~Opcodes.ACC_SUPER)));
if (in.innerName != null) {
pw.print(' ');
printIdAfterAccess(pw, in.innerName);
}
if (in.name != null) {
pw.print(" inner ");
pw.print(in.name);
}
if (in.outerName != null) {
pw.print(" outer ");
pw.print(in.outerName);
}
pw.println();
}
for (FieldNode fn : cn.fields) {
boolean annotations = false;
if (fn.visibleAnnotations != null && fn.visibleAnnotations.size() > 0) {
annotations = true;
}
if (fn.invisibleAnnotations != null && fn.invisibleAnnotations.size() > 0) {
annotations = true;
}
boolean deprecated = (fn.access & Opcodes.ACC_DEPRECATED) != 0;
pw.print("\n.field");
pw.print(access_fld(fn.access));
pw.print(' ');
printIdAfterAccess(pw,fn.name);
pw.print(' ');
pw.print(fn.desc);
if (fn.value instanceof String) {
StringBuffer buf = new StringBuffer();
Printer.appendString(buf, (String) fn.value);
pw.print(" = ");
pw.print(buf.toString());
} else if (fn.value != null) {
pw.print(" = ");
print(fn.value);
}
pw.println();
if (fn.signature != null) {
pw.print(".signature \"");
pw.print(fn.signature);
pw.println("\"");
}
if (deprecated) {
pw.println(".deprecated");
}
if (fn.visibleAnnotations != null) {
for (AnnotationNode an : fn.visibleAnnotations) {
printAnnotation(an, 1, -1);
}
}
if (fn.invisibleAnnotations != null) {
for (AnnotationNode an : fn.invisibleAnnotations) {
printAnnotation(an, 2, -1);
}
}
if (fn.signature != null || deprecated || annotations) {
pw.println(".end field");
}
}
for (MethodNode mn : cn.methods) {
pw.print("\n.method");
pw.print(access_mtd(mn.access));
pw.print(' ');
printIdAfterAccess(pw, mn.name);
pw.println(mn.desc);
if (mn.signature != null) {
pw.print(".signature \"");
pw.print(mn.signature);
pw.println("\"");
}
if (mn.annotationDefault != null) {
pw.println(".annotation default");
printAnnotationValue(mn.annotationDefault);
pw.println(".end annotation");
}
if (mn.visibleAnnotations != null) {
for (AnnotationNode an : mn.visibleAnnotations) {
printAnnotation(an, 1, -1);
}
}
if (mn.invisibleAnnotations != null) {
for (AnnotationNode an : mn.invisibleAnnotations) {
printAnnotation(an, 2, -1);
}
}
if (mn.visibleParameterAnnotations != null) {
for (int j = 0; j < mn.visibleParameterAnnotations.length; ++j) {
List<AnnotationNode> pas = mn.visibleParameterAnnotations[j];
if (pas != null) {
for (AnnotationNode an : pas) {
printAnnotation(an, 1, j + 1);
}
}
}
}
if (mn.invisibleParameterAnnotations != null) {
for (int j = 0; j < mn.invisibleParameterAnnotations.length; ++j) {
List<AnnotationNode> pas = mn.invisibleParameterAnnotations[j];
if (pas != null) {
for (AnnotationNode an : pas) {
printAnnotation(an, 2, j + 1);
}
}
}
}
for (String ex : mn.exceptions) {
println(".throws ", ex);
}
if ((mn.access & Opcodes.ACC_DEPRECATED) != 0) {
pw.println(".deprecated");
}
if (mn.instructions != null && mn.instructions.size() > 0) {
labelNames.clear();
if (mn.tryCatchBlocks != null) {
for (TryCatchBlockNode tcb : mn.tryCatchBlocks) {
pw.print(".catch ");
pw.print(tcb.type == null ? "all" : "all".equals(tcb.type) ? "\\u0097ll" : tcb.type);
pw.print(" from ");
print(tcb.start);
pw.print(" to ");
print(tcb.end);
pw.print(" using ");
print(tcb.handler);
pw.println();
}
}
for (int j = 0; j < mn.instructions.size(); ++j) {
AbstractInsnNode in = mn.instructions.get(j);
if (in.getType() != AbstractInsnNode.LINE && in.getType() != AbstractInsnNode.FRAME) {
if(in.getType()==AbstractInsnNode.LABEL){
pw.print(" ");
}else {
pw.print(" ");
}
}
in.accept(new MethodVisitor(ASM4) {
@Override
public void visitInsn(int opcode) {
print(opcode);
pw.println();
}
@Override
public void visitIntInsn(int opcode, int operand) {
print(opcode);
if (opcode == Opcodes.NEWARRAY) {
switch (operand) {
case Opcodes.T_BOOLEAN:
pw.println(" boolean");
break;
case Opcodes.T_CHAR:
pw.println(" char");
break;
case Opcodes.T_FLOAT:
pw.println(" float");
break;
case Opcodes.T_DOUBLE:
pw.println(" double");
break;
case Opcodes.T_BYTE:
pw.println(" byte");
break;
case Opcodes.T_SHORT:
pw.println(" short");
break;
case Opcodes.T_INT:
pw.println(" int");
break;
case Opcodes.T_LONG:
default:
pw.println(" long");
break;
}
} else {
pw.print(' ');
pw.println(operand);
}
}
@Override
public void visitVarInsn(int opcode, int var) {
print(opcode);
pw.print(' ');
pw.println(var);
}
@Override
public void visitTypeInsn(int opcode, String type) {
print(opcode);
pw.print(' ');
pw.println(type);
}
@Override
public void visitFieldInsn(int opcode, String owner, String name, String desc) {
print(opcode);
pw.print(' ');
pw.print(owner);
pw.print('/');
pw.print(name);
pw.print(' ');
pw.println(desc);
}
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc) {
print(opcode);
pw.print(' ');
pw.print(owner);
pw.print('/');
pw.print(name);
pw.print(desc);
if (opcode == Opcodes.INVOKEINTERFACE) {
pw.print(' ');
pw.print((Type.getArgumentsAndReturnSizes(desc) >> 2) - 1);
}
pw.println();
}
@Override
public void visitJumpInsn(int opcode, Label label) {
print(opcode);
pw.print(' ');
print(label);
pw.println();
}
@Override
public void visitLabel(Label label) {
print(label);
pw.println(':');
}
@Override
public void visitLdcInsn(Object cst) {
if (cst instanceof Integer || cst instanceof Float) {
pw.print("ldc_w ");
print(cst);
} else if (cst instanceof Long || cst instanceof Double) {
pw.print("ldc2_w ");
print(cst);
} else {
pw.print("ldc ");
if (cst instanceof Type) {
pw.print(((Type) cst).getInternalName());
} else {
print(cst);
}
}
pw.println();
}
@Override
public void visitIincInsn(int var, int increment) {
pw.print("iinc ");
pw.print(var);
pw.print(' ');
pw.println(increment);
}
@Override
public void visitTableSwitchInsn(int min, int max, Label dflt, Label... labels) {
pw.print("tableswitch ");
pw.println(min);
for (Label label : labels) {
pw.print(" ");
print(label);
pw.println();
}
pw.print(" default : ");
print(dflt);
pw.println();
}
@Override
public void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels) {
pw.println("lookupswitch");
for (int i = 0; i < keys.length; ++i) {
pw.print(" ");
pw.print(keys[i]);
pw.print(" : ");
print(labels[i]);
pw.println();
}
pw.print(" default : ");
print(dflt);
pw.println();
}
@Override
public void visitMultiANewArrayInsn(String desc, int dims) {
pw.print("multianewarray ");
pw.print(desc);
pw.print(' ');
pw.println(dims);
}
@Override
public void visitLineNumber(int line, Label start) {
pw.print(".line ");
pw.println(line);
}
});
}
if (mn.localVariables != null) {
for (LocalVariableNode lv : mn.localVariables) {
pw.print(" .var ");
pw.print(lv.index);
pw.print(" is '");
pw.print(lv.name);
pw.print("' ");
pw.print(lv.desc);
if (lv.signature != null) {
pw.print(" signature \"");
pw.print(lv.signature);
pw.print("\"");
}
pw.print(" from ");
print(lv.start);
pw.print(" to ");
print(lv.end);
pw.println();
}
}
println(" .limit locals ", Integer.toString(mn.maxLocals));
println(" .limit stack ", Integer.toString(mn.maxStack));
}
pw.println(".end method");
}
}
protected void println(final String directive, final String arg) {
if (arg != null) {
pw.print(directive);
pw.println(arg);
}
}
protected String access_clz(final int access) {
StringBuilder b = new StringBuilder();
if ((access & Opcodes.ACC_PUBLIC) != 0) {
b.append(" public");
}
if ((access & Opcodes.ACC_PRIVATE) != 0) {
b.append(" private");
}
if ((access & Opcodes.ACC_PROTECTED) != 0) {
b.append(" protected");
}
if ((access & Opcodes.ACC_FINAL) != 0) {
b.append(" final");
}
if ((access & Opcodes.ACC_SUPER) != 0) {
b.append(" super");
}
if ((access & Opcodes.ACC_ABSTRACT) != 0) {
b.append(" abstract");
}
if ((access & Opcodes.ACC_INTERFACE) != 0) {
b.append(" interface");
}
if ((access & Opcodes.ACC_SYNTHETIC) != 0) {
b.append(" synthetic");
}
if ((access & Opcodes.ACC_ANNOTATION) != 0) {
b.append(" annotation");
}
if ((access & Opcodes.ACC_ENUM) != 0) {
b.append(" enum");
}
return b.toString();
}
protected String access_fld(final int access) {
StringBuilder b = new StringBuilder();
if ((access & Opcodes.ACC_PUBLIC) != 0) {
b.append(" public");
}
if ((access & Opcodes.ACC_PRIVATE) != 0) {
b.append(" private");
}
if ((access & Opcodes.ACC_PROTECTED) != 0) {
b.append(" protected");
}
if ((access & Opcodes.ACC_STATIC) != 0) {
b.append(" static");
}
if ((access & Opcodes.ACC_FINAL) != 0) {
b.append(" final");
}
if ((access & Opcodes.ACC_VOLATILE) != 0) {
b.append(" volatile");
}
if ((access & Opcodes.ACC_TRANSIENT) != 0) {
b.append(" transient");
}
if ((access & Opcodes.ACC_SYNTHETIC) != 0) {
b.append(" synthetic");
}
if ((access & Opcodes.ACC_ENUM) != 0) {
b.append(" enum");
}
return b.toString();
}
protected String access_mtd(final int access) {
StringBuilder b = new StringBuilder();
if ((access & Opcodes.ACC_PUBLIC) != 0) {
b.append(" public");
}
if ((access & Opcodes.ACC_PRIVATE) != 0) {
b.append(" private");
}
if ((access & Opcodes.ACC_PROTECTED) != 0) {
b.append(" protected");
}
if ((access & Opcodes.ACC_STATIC) != 0) {
b.append(" static");
}
if ((access & Opcodes.ACC_FINAL) != 0) {
b.append(" final");
}
if ((access & Opcodes.ACC_SYNCHRONIZED) != 0) {
b.append(" synchronized");
}
if ((access & Opcodes.ACC_BRIDGE) != 0) {
b.append(" bridge");
}
if ((access & Opcodes.ACC_VARARGS) != 0) {
b.append(" varargs");
}
if ((access & Opcodes.ACC_NATIVE) != 0) {
b.append(" native");
}
if ((access & Opcodes.ACC_ABSTRACT) != 0) {
b.append(" abstract");
}
if ((access & Opcodes.ACC_STRICT) != 0) {
b.append(" strict");
}
if ((access & Opcodes.ACC_SYNTHETIC) != 0) {
b.append(" synthetic");
}
return b.toString();
}
protected void print(final int opcode) {
pw.print(Printer.OPCODES[opcode].toLowerCase());
}
protected void print(final Object cst) {
if (cst instanceof String) {
StringBuffer buf = new StringBuffer();
Printer.appendString(buf, (String) cst);
pw.print(buf.toString());
} else if (cst instanceof Float) {
Float f = (Float) cst;
if (!f.isNaN() && !f.isInfinite()) {
pw.print(cst + "F");
} else if (f.isNaN()) {
pw.print("floatnan");
} else {
double v = f;
if ((v == Float.POSITIVE_INFINITY)) {
pw.print("+floatinfinity");
} else {
pw.print("-floatinfinity");
}
}
} else if (cst instanceof Double) {
Double d = (Double) cst;
if (!d.isNaN() && !d.isInfinite()) {
pw.print(cst + "D");
} else if (d.isNaN()) {
pw.print("doublenan");
} else {
double v = d;
if ((v == Double.POSITIVE_INFINITY)) {
pw.print("+doubleinfinity");
} else {
pw.print("-doubleinfinity");
}
}
} else if (cst instanceof Long) {
pw.print(cst + "L");
} else {
pw.print(cst);
}
}
protected void print(final Label l) {
String name = labelNames.get(l);
if (name == null) {
name = "L" + labelNames.size();
labelNames.put(l, name);
}
pw.print(name);
}
protected void print(final LabelNode l) {
print(l.getLabel());
}
protected void printAnnotation(final AnnotationNode n, final int visible, final int param) {
pw.print(".annotation ");
if (visible > 0) {
if (param == -1) {
pw.print(visible == 1 ? "visible " : "invisible ");
} else {
pw.print(visible == 1 ? "visibleparam " : "invisibleparam ");
pw.print(param);
pw.print(' ');
}
pw.print(n.desc);
}
pw.println();
if (n.values != null) {
for (int i = 0; i < n.values.size(); i += 2) {
pw.print(n.values.get(i));
pw.print(' ');
printAnnotationValue(n.values.get(i + 1));
}
}
pw.println(".end annotation");
}
protected void printAnnotationValue(final Object value) {
if (value instanceof String[]) {
pw.print("e ");
pw.print(((String[]) value)[0]);
pw.print(" = ");
pw.print(((String[]) value)[1]);
pw.println();
} else if (value instanceof AnnotationNode) {
pw.print("@ ");
pw.print(((AnnotationNode) value).desc);
pw.print(" = ");
printAnnotation((AnnotationNode) value, 0, -1);
} else if (value instanceof byte[]) {
pw.print("[B = ");
byte[] v = (byte[]) value;
for (byte element : v) {
pw.print(element);
pw.print(' ');
}
pw.println();
} else if (value instanceof boolean[]) {
pw.print("[Z = ");
boolean[] v = (boolean[]) value;
for (boolean element : v) {
pw.print(element ? '1' : '0');
pw.print(' ');
}
pw.println();
} else if (value instanceof short[]) {
pw.print("[S = ");
short[] v = (short[]) value;
for (short element : v) {
pw.print(element);
pw.print(' ');
}
pw.println();
} else if (value instanceof char[]) {
pw.print("[C = ");
char[] v = (char[]) value;
for (char element : v) {
pw.print(new Integer(element));
pw.print(' ');
}
pw.println();
} else if (value instanceof int[]) {
pw.print("[I = ");
int[] v = (int[]) value;
for (int element : v) {
pw.print(element);
pw.print(' ');
}
pw.println();
} else if (value instanceof long[]) {
pw.print("[J = ");
long[] v = (long[]) value;
for (long element : v) {
pw.print(element);
pw.print(' ');
}
pw.println();
} else if (value instanceof float[]) {
pw.print("[F = ");
float[] v = (float[]) value;
for (float element : v) {
print(new Float(element));
pw.print(' ');
}
pw.println();
} else if (value instanceof double[]) {
pw.print("[D = ");
double[] v = (double[]) value;
for (double element : v) {
print(new Double(element));
pw.print(' ');
}
pw.println();
} else if (value instanceof List) {
List l = (List) value;
if (l.size() > 0) {
Object o = l.get(0);
if (o instanceof String[]) {
pw.print("[e ");
pw.print(((String[]) o)[0]);
pw.print(" = ");
} else if (o instanceof AnnotationNode) {
pw.print("[& ");
pw.print(((AnnotationNode) o).desc);
pw.print(" = ");
pw.print("[@ = ");
} else if (o instanceof String) {
pw.print("[s = ");
} else if (o instanceof Byte) {
pw.print("[B = ");
} else if (o instanceof Boolean) {
pw.print("[Z = ");
} else if (o instanceof Character) {
pw.print("[C = ");
} else if (o instanceof Short) {
pw.print("[S = ");
} else if (o instanceof Type) {
pw.print("[c = ");
} else if (o instanceof Integer) {
pw.print("[I = ");
} else if (o instanceof Float) {
pw.print("[F = ");
} else if (o instanceof Long) {
pw.print("[J = ");
} else if (o instanceof Double) {
pw.print("[D = ");
}
for (Object aL : l) {
printAnnotationArrayValue(aL);
pw.print(' ');
}
} else {
pw.print("; empty array annotation value");
}
pw.println();
} else if (value instanceof String) {
pw.print("s = ");
print(value);
pw.println();
} else if (value instanceof Byte) {
pw.print("B = ");
pw.println(((Byte) value).intValue());
} else if (value instanceof Boolean) {
pw.print("Z = ");
pw.println(((Boolean) value).booleanValue() ? 1 : 0);
} else if (value instanceof Character) {
pw.print("C = ");
pw.println(new Integer(((Character) value).charValue()));
} else if (value instanceof Short) {
pw.print("S = ");
pw.println(((Short) value).intValue());
} else if (value instanceof Type) {
pw.print("c = ");
pw.println(((Type) value).getDescriptor());
} else if (value instanceof Integer) {
pw.print("I = ");
print(value);
pw.println();
} else if (value instanceof Float) {
pw.print("F = ");
print(value);
pw.println();
} else if (value instanceof Long) {
pw.print("J = ");
print(value);
pw.println();
} else if (value instanceof Double) {
pw.print("D = ");
print(value);
pw.println();
} else {
throw new RuntimeException();
}
}
protected void printAnnotationArrayValue(final Object value) {
if (value instanceof String[]) {
print(((String[]) value)[1]);
} else if (value instanceof AnnotationNode) {
printAnnotation((AnnotationNode) value, 0, -1);
} else if (value instanceof String) {
print(value);
} else if (value instanceof Byte) {
pw.print(((Byte) value).intValue());
} else if (value instanceof Boolean) {
pw.print(((Boolean) value).booleanValue() ? 1 : 0);
} else if (value instanceof Character) {
pw.print(new Integer(((Character) value).charValue()));
} else if (value instanceof Short) {
pw.print(((Short) value).intValue());
} else if (value instanceof Type) {
pw.print(((Type) value).getDescriptor());
} else {
print(value);
}
}
protected void printFrameType(final Object type) {
if (type == Opcodes.TOP) {
pw.print("Top");
} else if (type == Opcodes.INTEGER) {
pw.print("Integer");
} else if (type == Opcodes.FLOAT) {
pw.print("Float");
} else if (type == Opcodes.LONG) {
pw.print("Long");
} else if (type == Opcodes.DOUBLE) {
pw.print("Double");
} else if (type == Opcodes.NULL) {
pw.print("Null");
} else if (type == Opcodes.UNINITIALIZED_THIS) {
pw.print("UninitializedThis");
} else if (type instanceof Label) {
pw.print("Uninitialized ");
print((Label) type);
} else {
pw.print("Object ");
pw.print(type);
}
}
}
================================================
FILE: d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jasmins.java
================================================
/*
* dex2jar - Tools to work with android .dex and java .class files
* Copyright (c) 2009-2014 Panxiaobo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.googlecode.d2j.jasmin;
import org.antlr.runtime.ANTLRReaderStream;
import org.antlr.runtime.ANTLRStringStream;
import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.RecognitionException;
import org.objectweb.asm.tree.ClassNode;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
public class Jasmins {
public static ClassNode parse(Path file) throws IOException {
try (BufferedReader bufferedReader = Files.newBufferedReader(file, StandardCharsets.UTF_8)) {
return parse(file.toString(), bufferedReader);
} catch (RecognitionException e) {
throw new RuntimeException("Fail to assemble " + file, e);
}
}
public static ClassNode parse(String fileName, Reader bufferedReader) throws IOException, RecognitionException {
ANTLRStringStream is = new ANTLRReaderStream(bufferedReader);
is.name = fileName;
JasminLexer lexer = new JasminLexer(is);
CommonTokenStream ts = new CommonTokenStream(lexer);
JasminParser parser = new JasminParser(ts);
return parser.parse();
}
public static ClassNode parse(String fileName, InputStream is) throws IOException, RecognitionException {
return parse(fileName, new InputStreamReader(is, "UTF-8"));
}
}
================================================
FILE: d2j-jasmin/src/test/java/com/googlecode/d2j/tools/jar/test/Jasmin2jTest.java
================================================
/*
* dex2jar - Tools to work with android .dex and java .class files
* Copyright (c) 2009-2015 Panxiaobo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.googlecode.d2j.tools.jar.test;
import com.googlecode.d2j.jasmin.JasminDumper;
import com.googlecode.d2j.jasmin.Jasmins;
import org.junit.Assert;
import org.junit.runner.Description;
import org.junit.runner.RunWith;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.ParentRunner;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.Statement;
import org.objectweb.asm.tree.ClassNode;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URL;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.List;
@RunWith(Jasmin2jTest.S.class)
public class Jasmin2jTest {
public static class S extends ParentRunner<Path> {
public S(Class<?> klass) throws InitializationError {
super(klass);
init(klass);
}
Path basePath;
List<Path> runners = new ArrayList<>();
public void init(final Class<?> testClass) throws InitializationError {
URL url = testClass.getResource("/jasmins/type.j");
Assert.assertNotNull(url);
final String file = url.getFile();
Assert.assertNotNull(file);
basePath = new File(file).toPath().getParent();
System.out.println("jasmins dir is " + basePath);
try {
Files.walkFileTree(basePath, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
if (file.getFileName().toString().endsWith(".j")) {
runners.add(basePath.relativize(file));
}
return super.visitFile(file, attrs);
}
});
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
protected List<Path> getChildren() {
return runners;
}
@Override
protected Description describeChild(Path child) {
return Description.createTestDescription(getTestClass().getJavaClass(), child.toString());
}
@Override
protected void runChild(final Path child, RunNotifier notifier) {
runLeaf(new Statement() {
@Override
public void evaluate() throws Throwable {
ClassNode cn= Jasmins.parse(basePath.resolve(child));
JasminDumper dumper=new JasminDumper(new PrintWriter(System.out,true));
dumper.dump(cn);
}
}, describeChild(child), notifier);
}
}
}
================================================
FILE: d2j-jasmin/src/test/resources/jasmins/type.j
================================================
.class public 'public'
.implements A
.implements interface
.implements public
.annotation visible Ljava/lang/A;
.annotation visible java/lang/B
.end annotation
.annotation visible Ljava/lang/annotation/Retention;
value e Ljava/lang/annotation/RetentionPolicy; = CLASS
value [e LR; = CLASS 'CLASS2' "CLASS3"
.end annotation
.method public ldc()V
ldc 0
ldc 1L
ldc "abc"
ldc I ;;;;;;; equals to LI;
ldc Ljava/lang/Object;
ldc [I
ldc [[Ljava/lang/Object;
.end method
.method public checkcast()V
invokeinterface android/content/DialogInterface/dismiss()V 0
checkcast Ljava/lang/Object;
checkcast [I
checkcast [[Ljava/lang/Object;
checkcast I
invokestatic LB;->clone()V
invokestatic B/clone()V
invokestatic [B->clone()V
invokestatic [B/clone()V
getstatic LB;->a:I
getstatic B/a I
getstatic [B->a:I
getstatic [B/a I
getstatic B/public I
.end method
.method public "public"()V
.end method
.method public 'static'()V
.end method
================================================
FILE: d2j-smali/build.gradle
================================================
apply plugin: 'antlr'
dependencies {
compile 'org.antlr:antlr4-runtime:4.5'
compile project(':dex-reader')
antlr 'org.antlr:antlr4:4.5'
compile project(':d2j-base-cmd')
compile project(':dex-writer')
testCompile 'org.smali:baksmali:2.0.6'
}
generateGrammarSource {
arguments += ['-no-listener', '-visitor','-package','com.googlecode.d2j.smali.antlr4']
}
sourceSets {
test.output.resourcesDir = "build/classes/test"
main.antlr.srcDirs = ['src/main/antlr4']
}
================================================
FILE: d2j-smali/src/main/antlr4/com/googlecode/d2j/smali/antlr4/Smali.g4
================================================
grammar Smali;
fragment
INT_NENT: ('+'|'-')? (
'0'
| ('1'..'9') ('0'..'9')*
| '0' ('0'..'7')+
| ('0x'|'0X') HEX_DIGIT+
);
fragment
FLOAT_NENT
: (('+'|'-')?( ('0'..'9')+ '.' ('0'..'9')* EXPONENT?
| '.' ('0'..'9')+ EXPONENT?
| ('0'..'9')+ EXPONENT)| ( ('+'|'-') F_INFINITY) )
;
fragment
F_NAN : ('N'|'n') ('A'|'a') ('N'|'n');
COMMENT
: ('//' ~('\n'|'\r')* '\r'? '\n'
| '#' ~('\n'|'\r')* '\r'? '\n'
| '/*' .*? '*/' ) -> skip
;
WS : [ \t\r\n]+ -> skip
;
fragment
EXPONENT : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;
fragment
HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ;
fragment
ESC_SEQ
: '\\' ('b'|'t'|'n'|'f'|'r'|'\''|'\"'|'\\')
| UNICODE_ESC
| OCTAL_ESC
;
fragment
OCTAL_ESC
: '\\' ('0'..'3') ('0'..'7') ('0'..'7')
| '\\' ('0'..'7') ('0'..'7')
| '\\' ('0'..'7')
;
fragment
UNICODE_ESC
: '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
;
VOID_TYPE:'V';
fragment
FRAGMENT_PRIMITIVE_TYPE:'B'|'Z'|'S'|'C'|'I'|'F'|'J'|'D';
fragment
FRAGMENT_OBJECT_TYPE: 'L' (ESC_SEQ |~(';'|':'|'\\'|' '|'\n'|'\t'|'\r'|'('|')'))+ ';' ;
fragment
FRAGMENT_ARRAY_TYPE: ('[')+ (FRAGMENT_PRIMITIVE_TYPE|FRAGMENT_OBJECT_TYPE);
fragment
FRAGMENT_ID: (ESC_SEQ| ~('\\'|'\r'|'\n'|'\t'|' '|':'|'-'|'='|','|'{'|'}'|'('|')'|'+'|'\"'|'\''|'#'|'/'|'.'|';'))+;
fragment
FRAGMENT_METHOD_PROTO: '(' (FRAGMENT_OBJECT_TYPE|FRAGMENT_ARRAY_TYPE|FRAGMENT_PRIMITIVE_TYPE)* ')' ('V' | FRAGMENT_OBJECT_TYPE|FRAGMENT_ARRAY_TYPE|FRAGMENT_PRIMITIVE_TYPE)
;
fragment
FRAGMENT_FIELD_PART:
FRAGMENT_ID
':' (FRAGMENT_OBJECT_TYPE|FRAGMENT_ARRAY_TYPE|FRAGMENT_PRIMITIVE_TYPE)
;
METHOD_FULL: (FRAGMENT_OBJECT_TYPE|FRAGMENT_ARRAY_TYPE) '->' FRAGMENT_ID FRAGMENT_METHOD_PROTO;
METHOD_PART: FRAGMENT_ID FRAGMENT_METHOD_PROTO;
METHOD_PROTO: FRAGMENT_METHOD_PROTO;
FIELD_FULL: (FRAGMENT_OBJECT_TYPE|FRAGMENT_ARRAY_TYPE) '->' FRAGMENT_FIELD_PART;
FIELD_PART: FRAGMENT_FIELD_PART;
LABEL: ':' FRAGMENT_ID;
SMALI_V2_LOCAL_NAME_TYPE : '"' ( ESC_SEQ | ~('\\'|'"') )* '"' ':' (FRAGMENT_OBJECT_TYPE|FRAGMENT_ARRAY_TYPE|FRAGMENT_PRIMITIVE_TYPE)
;
F_INFINITY: ('I'|'i') ('N'|'n') ('F'|'f') ('I'|'i') ('N'|'n') ('I'|'i') ('T'|'t') ('Y'|'y') ;
FLOAT_NAN : F_NAN ('f'|'F');
DOUBLE_NAN: F_NAN ('d'|'D')?;
FLOAT_INFINITY: F_INFINITY ('f'|'F');
DOUBLE_INFINITY: F_INFINITY ('d'|'D')?;
BASE_FLOAT : (('0'..'9')+|FLOAT_NENT) ('f'|'F');
BASE_DOUBLE : FLOAT_NENT ('d'|'D')? | ('0'..'9')+ ('d'|'D') ;
CHAR : '\'' ( ESC_SEQ | ~('\\'|'\'') ) '\'';
LONG : INT_NENT ('L'|'l');
SHORT : INT_NENT ('S'|'s');
BYTE : INT_NENT ('T'|'t');
INT : INT_NENT;
BOOLEAN : 'true'|'false';
STRING
: '"' ( ESC_SEQ | ~('\\'|'"') )* '"'
;
OBJECT_TYPE: FRAGMENT_OBJECT_TYPE;
ARRAY_TYPE: FRAGMENT_ARRAY_TYPE;
PRIMITIVE_TYPE: FRAGMENT_PRIMITIVE_TYPE;
ACC: 'public' | 'private' | 'protected' | 'static' | 'final' | 'synchronized' | 'bridge' | 'varargs' | 'native' |
'abstract' | 'strictfp' | 'synthetic' | 'constructor' | 'interface' | 'enum' |
'annotation' | 'volatile' | 'transient' | 'declared-synchronized' ;
ANN_VISIBLE
: 'build' | 'runtime' | 'system';
REGISTER: ('v'|'V'|'p'|'P') '0'..'9'+;
NOP : 'nop';
MOVE : 'move';
RETURN : 'return';
CONST : 'const';
THROW : 'throw';
GOTO : 'goto';
AGET : 'aget';
APUT : 'aput';
IGET : 'iget';
IPUT : 'iput';
SGET : 'sget';
SPUT : 'sput';
NULL : 'null';
ID : FRAGMENT_ID
;
DPARAMETER:'.parameter';
DENUM:'.enum';
DPARAM: '.param';
DLINENUMBER: '.line';
DLOCAL:'.local';
DENDLOCAL:'.end local';
DRESTARTLOCAL:'.restart local';
DPROLOGUE:'.prologue';
DEPIOGUE:'.epiogue';
sFiles: sFile+;
sFile : '.class' sAccList className=OBJECT_TYPE
( sSuper | sInterface|sSource|sMethod|sField|sAnnotation)*
'.end class'?
;
sSource : '.source' src=STRING;
sSuper : '.super' name=OBJECT_TYPE;
sInterface: '.implements' name=OBJECT_TYPE;
sMethod
: '.method' sAccList methodObj=(METHOD_FULL|METHOD_PART)
( sAnnotation
| sParameter
| sInstruction
)*
'.end method';
sField : '.field' sAccList fieldObj=(FIELD_FULL|FIELD_PART) ('=' sBaseValue)?
(sAnnotation*
'.end field')?
;
sAccList: ACC*;
sAnnotation
: '.annotation' visibility=ANN_VISIBLE type=OBJECT_TYPE
(sAnnotationKeyName '=' sAnnotationValue)*
'.end annotation'
;
sSubannotation
: '.subannotation' type=OBJECT_TYPE (sAnnotationKeyName '=' sAnnotationValue )* '.end subannotation'
;
sParameter
: parameter=DPARAMETER (name=STRING)? ( (sAnnotation)* '.end parameter')?
| param=DPARAM r=REGISTER (',' name=STRING )? (sAnnotation* '.end param')?
;
sAnnotationKeyName
: PRIMITIVE_TYPE |VOID_TYPE
|ANN_VISIBLE|REGISTER|BOOLEAN|ID | NULL
|FLOAT_INFINITY|DOUBLE_INFINITY|FLOAT_NAN|DOUBLE_NAN
|NOP|MOVE|RETURN|CONST|THROW|GOTO|AGET|APUT|IGET|IPUT|SGET|SPUT|ACC;
sAnnotationValue
:sSubannotation
|sBaseValue
|sArrayValue
| ( '.iget' | '.iput' | '.sget' | '.sput' ) FIELD_FULL
| ( '.invoke-instance' | '.invoke-static' ) METHOD_FULL
;// field,method,array,subannotation
sBaseValue
:STRING
|BOOLEAN|BYTE|SHORT|CHAR|INT|LONG
|BASE_FLOAT| FLOAT_INFINITY | FLOAT_NAN
|BASE_DOUBLE|DOUBLE_INFINITY|DOUBLE_NAN
|METHOD_FULL
|METHOD_PROTO
|OBJECT_TYPE
|ARRAY_TYPE
|PRIMITIVE_TYPE
|VOID_TYPE
|NULL
|DENUM FIELD_FULL
;
sArrayValue: '{' sAnnotationValue? (',' sAnnotationValue)* '}';
sInstruction
:fline
|flocal
|fend
|frestart
|fprologue
|fepiogue
|fregisters
|flocals
|fcache
|fcacheall
|f0x
|f0t
|f1t
|f2t
|f1x
|fconst
|ft2c
|ff1c
|ff2c
|f2x
|f3x
|ft5c
|fm5c
|fmrc
|fm45cc
|fm4rcc
|fmcustomc
|fmcustomrc
|ftrc
|sLabel
|f2sb
|f31t
|fpackageswitch
|fspareswitch
|farraydata
;
fline:'.line' line=INT;
flocal:'.local' r=REGISTER ','
(
(name1=sAnnotationKeyName | name2=STRING) ':' type=(OBJECT_TYPE | PRIMITIVE_TYPE | ARRAY_TYPE) // normal case
| v1=FIELD_PART // smali 1.x
| v2=SMALI_V2_LOCAL_NAME_TYPE // smali 2.x
)
(',' sig=STRING)?
;
fend:'.end local' r=REGISTER;
frestart:'.restart local' r=REGISTER;
fprologue:'.prologue';
fepiogue:'.epiogue';
fregisters:'.registers' xregisters=INT;
flocals: '.locals' xlocals=INT;
fcache:'.catch' type=OBJECT_TYPE '{' start=LABEL '..' end=LABEL '}' handle=LABEL;
fcacheall:'.catchall' '{' start=LABEL '..' end=LABEL '}' handle=LABEL;
sLabel: label=LABEL;
fpackageswitch:'.packed-switch' start=INT LABEL+ '.end packed-switch';
fspareswitch:'.sparse-switch' (INT '->' LABEL)* '.end sparse-switch';
farraydata:'.array-data' size=INT (sBaseValue)+ '.end array-data';
f0x : op=(NOP
| 'return-void')
;
f0t : op=(GOTO|'goto/16'|'goto/32') target=LABEL
;
f1x : op=('move-result'|'move-result-wide'|'move-result-object'
| 'move-exception'
| RETURN|'return-wide'|'return-object'
| THROW
| 'monitor-enter' | 'monitor-exit' ) r1=REGISTER
;
fconst
: op=('const/4'|'const/16'|CONST|'const/high16'|'const-wide/16'|'const-wide/32'|'const-wide/high16'|'const-wide')
r1=REGISTER ',' cst=(INT|LONG)
| op=('const-string'|'const-string/jumbo') r1=REGISTER ',' cst=STRING
| op=('const-class'|'check-cast'|'new-instance') r1=REGISTER ',' cst=(OBJECT_TYPE|ARRAY_TYPE)
;
ff1c : op=(SGET
|'sget-wide'
|'sget-object'
|'sget-boolean'
|'sget-byte'
|'sget-char'
|'sget-short'
|SPUT
|'sput-wide'
|'sput-object'
|'sput-boolean'
|'sput-byte'
|'sput-char'
|'sput-short' ) r1=REGISTER ',' fld=FIELD_FULL
;
ft2c : op=('instance-of'|'new-array') r1=REGISTER ',' r2=REGISTER ',' type=(OBJECT_TYPE|ARRAY_TYPE);
ff2c : op=(IGET
|'iget-wide'
|'iget-object'
|'iget-boolean'
|'iget-byte'
|'iget-char'
|'iget-short'
| IPUT
|'iput-wide'
|'iput-object'
|'iput-boolean'
|'iput-byte'
|'iput-char'
|'iput-short' ) r1=REGISTER ',' r2=REGISTER ',' fld=FIELD_FULL
;
f2x : op=(MOVE|'move/from16'|'move/16'
| 'move-wide'|'move-wide/from16'|'move-wide/16'
| 'move-object'|'move-object/from16'|'move-object/16'
| 'array-length'
|'neg-int'
|'not-int'
|'neg-long'
|'not-long'
|'neg-float'
|'neg-double'
|'int-to-long'
|'int-to-float'
|'int-to-double'
|'long-to-int'
|'long-to-float'
|'long-to-double'
|'float-to-int'
|'float-to-long'
|'float-to-double'
|'double-to-int'
|'double-to-long'
|'double-to-float'
|'int-to-byte'
|'int-to-char'
|'int-to-short'
|'add-int/2addr'
|'sub-int/2addr'
|'mul-int/2addr'
|'div-int/2addr'
|'rem-int/2addr'
|'and-int/2addr'
|'or-int/2addr'
|'xor-int/2addr'
|'shl-int/2addr'
|'shr-int/2addr'
|'ushr-int/2addr'
|'add-long/2addr'
|'sub-long/2addr'
|'mul-long/2addr'
|'div-long/2addr'
|'rem-long/2addr'
|'and-long/2addr'
|'or-long/2addr'
|'xor-long/2addr'
|'shl-long/2addr'
|'shr-long/2addr'
|'ushr-long/2addr'
|'add-float/2addr'
|'sub-float/2addr'
|'mul-float/2addr'
|'div-float/2addr'
|'rem-float/2addr'
|'add-double/2addr'
|'sub-double/2addr'
|'mul-double/2addr'
|'div-double/2addr'
|'rem-double/2addr') r1=REGISTER ',' r2=REGISTER
;
f3x : op=('cmpl-float'|'cmpg-float'|'cmpl-double'|'cmpg-double'|'cmp-long'
| AGET|'aget-wide'|'aget-object'|'aget-boolean'|'aget-byte'|'aget-char'|'aget-short'
| APUT|'aput-wide'|'aput-object'|'aput-boolean'|'aput-byte'|'aput-char'|'aput-short'
|'add-int'
|'sub-int'
|'mul-int'
|'div-int'
|'rem-int'
|'and-int'
|'or-int'
|'xor-int'
|'shl-int'
|'shr-int'
|'ushr-int'
|'add-long'
|'sub-long'
|'mul-long'
|'div-long'
|'rem-long'
|'and-long'
|'or-long'
|'xor-long'
|'shl-long'
|'shr-long'
|'ushr-long'
|'add-float'
|'sub-float'
|'mul-float'
|'div-float'
|'rem-float'
|'add-double'
|'sub-double'
|'mul-double'
|'div-double'
|'rem-double') r1=REGISTER ',' r2=REGISTER ',' r3=REGISTER
;
ft5c : op='filled-new-array' '{' (REGISTER (',' REGISTER)* )? '}' ',' type=ARRAY_TYPE;
fm5c : op=('invoke-virtual'|'invoke-super'|'invoke-direct'
|'invoke-static'|'invoke-interface'
) '{' (REGISTER (',' REGISTER)* )? '}' ',' method=METHOD_FULL
;
fmrc : op=('invoke-virtual/range'|'invoke-super/range'
|'invoke-direct/range'|'invoke-static/range'
|'invoke-interface/range'
) '{' (rstart=REGISTER '..' rend=REGISTER)? '}' ',' method=METHOD_FULL
;
fm45cc : op='invoke-polymorphic' '{' (REGISTER (',' REGISTER)* )? '}' ',' method=METHOD_FULL ',' proto=METHOD_PROTO
;
fm4rcc : op='invoke-polymorphic/range' '{' (rstart=REGISTER '..' rend=REGISTER)? '}' ',' method=METHOD_FULL ',' proto=METHOD_PROTO
;
fmcustomc : op='invoke-custom' '{' (REGISTER (',' REGISTER)* )? '}' ',' sArrayValue
;
fmcustomrc : op='invoke-custom/range' '{' (rstart=REGISTER '..' rend=REGISTER)? '}' ',' sArrayValue
;
ftrc : op='filled-new-array/range' '{' (rstart=REGISTER '..' rend=REGISTER)? '}' ',' type=(OBJECT_TYPE|ARRAY_TYPE);
f31t: op=('fill-array-data'|'packed-switch'|'sparse-switch') r1=REGISTER ',' label=LABEL;
f1t :op=('if-eqz'|'if-nez'|'if-ltz'|'if-gez'|'if-gtz'|'if-lez') r1=REGISTER ',' label=LABEL
;
f2t :op=('if-eq'|'if-ne'|'if-lt'|'if-ge'|'if-gt'|'if-le') r1=REGISTER ',' r2=REGISTER ',' label=LABEL
;
f2sb :op=('add-int/lit16'|'rsub-int'|'mul-int/lit16'|'div-int/lit16'|'rem-int/lit16'|'and-int/lit16'
|'or-int/lit16'|'xor-int/lit16'|'add-int/lit8'|'rsub-int/lit8'|'mul-int/lit8'
|'div-int/lit8'|'rem-int/lit8'|'and-int/lit8'|'or-int/lit8'|'xor-int/lit8'|'shl-int/lit8'|'shr-int/lit8'
|'ushr-int/lit8'
) r1=REGISTER ',' r2=REGISTER ',' lit=INT
;
================================================
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/AntlrSmaliUtil.java
================================================
package com.googlecode.d2j.smali;
import com.googlecode.d2j.*;
import com.googlecode.d2j.reader.Op;
import com.googlecode.d2j.smali.antlr4.SmaliBaseVisitor;
import com.googlecode.d2j.smali.antlr4.SmaliLexer;
import com.googlecode.d2j.smali.antlr4.SmaliParser;
import com.googlecode.d2j.visitors.*;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.tree.TerminalNode;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.googlecode.d2j.smali.Utils.*;
public class AntlrSmaliUtil {
public static void acceptFile(SmaliParser.SFileContext ctx, DexFileVisitor dexFileVisitor) {
DexClassVisitor dexClassVisitor;
String className = Utils.unEscapeId(ctx.className.getText());
int access = collectAccess(ctx.sAccList());
List<SmaliParser.SSuperContext> superContexts = ctx.sSuper();
String superClass = null;
if (superContexts.size() > 0) {
superClass = Utils.unEscapeId(superContexts.get(superContexts.size() - 1).name.getText());
}
List<SmaliParser.SInterfaceContext> itfs = ctx.sInterface();
String[] interfaceNames = null;
if (itfs.size() > 0) {
interfaceNames = new String[itfs.size()];
for (int i = 0; i < itfs.size(); i++) {
interfaceNames[i] = Utils.unEscapeId(itfs.get(i).name.getText());
}
}
dexClassVisitor = dexFileVisitor.visit(access, className, superClass, interfaceNames);
List<SmaliParser.SSourceContext> sources = ctx.sSource();
if (sources.size() > 0) {
dexClassVisitor.visitSource(
Utils.unescapeStr(sources.get(sources.size() - 1).src.getText())
);
}
acceptAnnotations(ctx.sAnnotation(), dexClassVisitor);
acceptField(ctx.sField(), className, dexClassVisitor);
acceptMethod(ctx.sMethod(), className, dexClassVisitor);
dexClassVisitor.visitEnd();
}
private static void acceptMethod(List<SmaliParser.SMethodContext> sMethodContexts, String className, DexClassVisitor dexClassVisitor) {
if (dexClassVisitor == null || sMethodContexts == null || sMethodContexts.size() == 0) {
return;
}
for (SmaliParser.SMethodContext ctx : sMethodContexts) {
acceptMethod(ctx, className, dexClassVisitor);
}
}
public static void acceptMethod(SmaliParser.SMethodContext ctx, String className, DexClassVisitor dexClassVisitor) {
Method method;
Token methodObj = ctx.methodObj;
if (methodObj.getType() == SmaliLexer.METHOD_FULL) {
method = Utils.parseMethodAndUnescape(methodObj.getText());
} else {// PART
method = Utils.parseMethodAndUnescape(className, methodObj.getText());
}
int access = collectAccess(ctx.sAccList());
boolean isStatic = 0 != (access & DexConstants.ACC_STATIC);
DexMethodVisitor dexMethodVisitor = dexClassVisitor.visitMethod(access, method);
if (dexMethodVisitor != null) {
acceptAnnotations(ctx.sAnnotation(), dexMethodVisitor);
int ins = Utils.methodIns(method, isStatic);
int totalRegisters = findTotalRegisters(ctx, ins);
if (totalRegisters < 0) {
totalRegisters = ins;
}
M m = new M(method, totalRegisters, ins, isStatic);
acceptParameter(ctx.sParameter(), m, dexMethodVisitor);
acceptCode(ctx, m, dexMethodVisitor);
dexMethodVisitor.visitEnd();
}
}
private static class M {
int locals;
String[] paramNames;
int map[];
public int total;
void setNameByIdx(int index, String name) {
if (index >= 0 && index < paramNames.length) {
paramNames[index] = name;
}
}
int regToParamIdx(int reg) {
int x = reg - locals;
if (x >= 0 && x < map.length) {
return map[x];
}
return 0;
}
int pareReg(String str) {
char f = Character.toLowerCase(str.charAt(0));
if (f == 'p') {
return parseInt(str.substring(1)) + locals;
} else {
return parseInt(str.substring(1));
}
}
M(Method method, int totals, int ins, boolean isStatic) {
this.locals = totals - ins;
this.total = totals;
String paramTypes[] = method.getParameterTypes();
paramNames = new String[paramTypes.length];
map = new int[ins];
int start = 0;
if (!isStatic) {
map[start] = -1;
start++;
}
for (int i = 0; i < paramTypes.length; i++) {
char t = paramTypes[i].charAt(0);
map[start++] = i;
if (t == 'J' || t == 'D') {
map[start++] = i;
}
}
}
}
private static void acceptCode(SmaliParser.SMethodContext ctx, final M m, DexMethodVisitor dexMethodVisitor) {
if (ctx == null || dexMethodVisitor == null) {
return;
}
final DexCodeVisitor dexCodeVisitor = dexMethodVisitor.visitCode();
if (dexCodeVisitor == null) {
return;
}
final SmaliCodeVisitor scv = new SmaliCodeVisitor(dexCodeVisitor);
final DexDebugVisitor dexDebugVisitor = scv.visitDebug();
final List<SmaliParser.SInstructionContext> instructionContexts = ctx.sInstruction();
final SmaliBaseVisitor v = new SmaliBaseVisitor() {
@Override
public Object visitFregisters(SmaliParser.FregistersContext ctx) {
return null;
}
@Override
public Object visitFlocals(SmaliParser.FlocalsContext ctx) {
return null;
}
@Override
public Object visitFline(SmaliParser.FlineContext ctx) {
if (dexDebugVisitor != null) {
DexLabel dexLabel = new DexLabel();
scv.visitLabel(dexLabel);
dexDebugVisitor.visitLineNumber(Utils.parseInt(ctx.line.getText()), dexLabel);
}
return null;
}
@Override
public Object visitFend(SmaliParser.FendContext ctx) {
if (dexDebugVisitor != null) {
DexLabel dexLabel = new DexLabel();
scv.visitLabel(dexLabel);
int reg = m.pareReg(ctx.r.getText());
dexDebugVisitor.visitEndLocal(reg, dexLabel);
}
return null;
}
@Override
public Object visitFlocal(SmaliParser.FlocalContext ctx) {
if (dexDebugVisitor != null) {
DexLabel dexLabel = new DexLabel();
scv.visitLabel(dexLabel);
int reg = m.pareReg(ctx.r.getText());
String name;
String type;
if (ctx.v1 != null) {
Field fld = parseFieldAndUnescape("Lt;", ctx.v1.getText());
name = fld.getName();
type = fld.getType();
} else if (ctx.v2 != null) {
String txt = ctx.v2.getText();
int i = findString(txt, 1, txt.length(), '\"');
name = unescapeStr(txt.substring(0, i + 1));
type = unEscapeId(txt.substring(i + 2));
} else {
if (ctx.name2 != null) {
name = unescapeStr(ctx.name2.getText());
} else {
name = unEscapeId(ctx.name1.getText());
}
type = unEscapeId(ctx.type.getText());
}
String sig = ctx.sig == null ? null : unescapeStr(ctx.sig.getText());
dexDebugVisitor.visitStartLocal(reg, dexLabel, name, type, sig);
}
return null;
}
@Override
public Object visitFrestart(SmaliParser.FrestartContext ctx) {
if (dexDebugVisitor != null) {
DexLabel dexLabel = new DexLabel();
scv.visitLabel(dexLabel);
int reg = m.pareReg(ctx.r.getText());
dexDebugVisitor.visitRestartLocal(reg, dexLabel);
}
return null;
}
@Override
public Object visitFprologue(SmaliParser.FprologueContext ctx) {
if (dexDebugVisitor != null) {
DexLabel dexLabel = new DexLabel();
scv.visitLabel(dexLabel);
dexDebugVisitor.visitPrologue(dexLabel);
}
return null;
}
Map<String, DexLabel> labelMap = new HashMap<>();
@Override
public Object visitSLabel(SmaliParser.SLabelContext ctx) {
scv.visitLabel(getLabel(ctx.label.getText()));
return null;
}
@Override
public Object visitFspareswitch(SmaliParser.FspareswitchContext ctx) {
List<TerminalNode> ints = ctx.INT();
List<TerminalNode> ts = ctx.LABEL();
int cases[] = new int[ts.size()];
DexLabel labels[] = new DexLabel[ts.size()];
for (int i = 0; i < ts.size(); i++) {
cases[i] = parseInt(ints.get(i).getSymbol().getText());
labels[i] = getLabel(ts.get(i).getSymbol().getText());
}
scv.dSparseSwitch(cases, labels);
return null;
}
@Override
public Object visitFarraydata(SmaliParser.FarraydataContext ctx) {
int size = parseInt(ctx.size.getText());
List<SmaliParser.SBaseValueContext> ts = ctx.sBaseValue();
byte[] ps = new byte[ts.size()];
for (int i = 0; i < ts.size(); i++) {
ps[i] = ((Number) parseBaseValue(ts.get(i))).byteValue();
}
scv.dArrayData(size, ps);
return null;
}
Op getOp(Token t) {
return Utils.getOp(t.getText());
}
@Override
public Object visitF0x(SmaliParser.F0xContext ctx) {
scv.visitStmt0R(getOp(ctx.op));
return null;
}
@Override
public Object visitF0t(SmaliParser.F0tContext ctx) {
scv.visitJumpStmt(getOp(ctx.op), 0, 0, getLabel(ctx.target.getText()));
return null;
}
@Override
public Object visitF1x(SmaliParser.F1xContext ctx) {
scv.visitStmt1R(getOp(ctx.op), m.pareReg(ctx.r1.getText()));
return null;
}
@Override
public Object visitFconst(SmaliParser.FconstContext ctx) {
Op op = getOp(ctx.op);
int r = m.pareReg(ctx.r1.getText());
Token cst = ctx.cst;
switch (op) {
case CONST_STRING:
case CONST_STRING_JUMBO:
scv.visitConstStmt(op, r, unescapeStr(cst.getText()));
break;
case CONST_CLASS:
scv.visitConstStmt(op, r, new DexType(unEscapeId(cst.getText())));
break;
case CHECK_CAST:
case NEW_INSTANCE:
scv.visitTypeStmt(op, r, 0, unEscapeId(cst.getText()));
break;
case CONST_WIDE:
scv.visitConstStmt(op, r, cst.getType() == SmaliLexer.INT ? ((long) parseInt(cst.getText())) : parseLong(cst.getText()));
break;
case CONST_WIDE_16: {
long v;
if (cst.getType() == SmaliLexer.LONG) {
v = parseLong(cst.getText());
} else {
v = (short) parseInt(cst.getText());
}
scv.visitConstStmt(op, r, v);
}
break;
case CONST_WIDE_32: {
long v;
if (cst.getType() == SmaliLexer.LONG) {
v = parseLong(cst.getText());
} else {
v = parseInt(cst.getText());
}
scv.visitConstStmt(op, r, v);
}
break;
case CONST_WIDE_HIGH16: {
long v;
if (cst.getType() == SmaliLexer.LONG) {
v = parseLong(cst.getText());
} else {
v = (short) parseInt(cst.getText());
v <<= 48;
}
scv.visitConstStmt(op, r, v);
}
break;
case CONST:
case CONST_4:
case CONST_16: {
int v = parseInt(cst.getText());
scv.visitConstStmt(op, r, v);
}
break;
case CONST_HIGH16: {
int v = parseInt(cst.getText());
v <<= 16;
scv.visitConstStmt(op, r, v);
}
break;
default:
throw new RuntimeException();
}
return null;
}
@Override
public Object visitFf1c(SmaliParser.Ff1cContext ctx) {
int r = m.pareReg(ctx.r1.getText());
Field field = parseFieldAndUnescape(ctx.fld.getText());
scv.visitFieldStmt(getOp(ctx.op), r, 0, field);
return null;
}
@Override
public Object visitFt2c(SmaliParser.Ft2cContext ctx) {
int r1 = m.pareReg(ctx.r1.getText());
int r2 = m.pareReg(ctx.r2.getText());
scv.visitTypeStmt(getOp(ctx.op), r1, r2, unEscapeId(ctx.type.getText()));
return null;
}
@Override
public Object visitFf2c(SmaliParser.Ff2cContext ctx) {
int r1 = m.pareReg(ctx.r1.getText());
int r2 = m.pareReg(ctx.r2.getText());
scv.visitFieldStmt(getOp(ctx.op), r1, r2, parseFieldAndUnescape(ctx.fld.getText()));
return null;
}
@Override
public Object visitF2x(SmaliParser.F2xContext ctx) {
int r1 = m.pareReg(ctx.r1.getText());
int r2 = m.pareReg(ctx.r2.getText());
scv.visitStmt2R(getOp(ctx.op), r1, r2);
return null;
}
@Override
public Object visitF3x(SmaliParser.F3xContext ctx) {
int r1 = m.pareReg(ctx.r1.getText());
int r2 = m.pareReg(ctx.r2.getText());
int r3 = m.pareReg(ctx.r3.getText());
scv.visitStmt3R(getOp(ctx.op), r1, r2, r3);
return null;
}
@Override
public Object visitFt5c(SmaliParser.Ft5cContext ctx) {
Op op = getOp(ctx.op);
List<TerminalNode> ts = ctx.REGISTER();
int rs[] = new int[ts.size()];
for (int i = 0; i < ts.size(); i++) {
rs[i] = m.pareReg(ts.get(i).getSymbol().getText());
}
scv.visitFilledNewArrayStmt(op, rs, unEscapeId(ctx.type.getText()));
return null;
}
@Override
public Object visitFm5c(SmaliParser.Fm5cContext ctx) {
Op op = getOp(ctx.op);
List<TerminalNode> ts = ctx.REGISTER();
int rs[] = new int[ts.size()];
for (int i = 0; i < ts.size(); i++) {
rs[i] = m.pareReg(ts.get(i).getSymbol().getText());
}
scv.visitMethodStmt(op, rs, parseMethodAndUnescape(ctx.method.getText()));
return null;
}
@Override
public Object visitFmrc(SmaliParser.FmrcContext ctx) {
if (ctx.rstart != null) {
int start = m.pareReg(ctx.rstart.getText());
int end = m.pareReg(ctx.rend.getText());
int size = end - start + 1;
int rs[] = new int[size];
for (int i = 0; i < size; i++) {
rs[i] = start + i;
}
gitextract__96gfnvm/ ├── .hgignore ├── .hgtags ├── .travis.yml ├── LICENSE.txt ├── NOTICE.txt ├── README.md ├── build.gradle ├── d2j-base-cmd/ │ ├── build.gradle │ └── src/ │ └── main/ │ └── java/ │ └── com/ │ └── googlecode/ │ └── dex2jar/ │ └── tools/ │ └── BaseCmd.java ├── d2j-j6/ │ ├── README.md │ ├── build.gradle │ ├── j6-weave.txt │ ├── jarjar-rules.txt │ ├── proguard.txt │ └── src/ │ └── main/ │ └── java/ │ ├── j6/ │ │ ├── Files.java │ │ └── Thro.java │ └── pxb/ │ └── java/ │ └── nio/ │ ├── charset/ │ │ └── StandardCharsets.java │ └── file/ │ ├── CopyOption.java │ ├── FileSystem.java │ ├── FileVisitResult.java │ ├── FileVisitor.java │ ├── Files.java │ ├── LinkOption.java │ ├── OpenOption.java │ ├── Path.java │ ├── SimpleFileVisitor.java │ ├── attribute/ │ │ ├── BasicFileAttributes.java │ │ └── FileAttribute.java │ └── spi/ │ └── FileSystemProvider.java ├── d2j-jasmin/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ ├── antlr3/ │ │ │ └── com/ │ │ │ └── googlecode/ │ │ │ └── d2j/ │ │ │ └── jasmin/ │ │ │ └── Jasmin.g │ │ └── java/ │ │ └── com/ │ │ └── googlecode/ │ │ └── d2j/ │ │ └── jasmin/ │ │ ├── Jar2JasminCmd.java │ │ ├── Jasmin2JarCmd.java │ │ ├── JasminDumper.java │ │ └── Jasmins.java │ └── test/ │ ├── java/ │ │ └── com/ │ │ └── googlecode/ │ │ └── d2j/ │ │ └── tools/ │ │ └── jar/ │ │ └── test/ │ │ └── Jasmin2jTest.java │ └── resources/ │ └── jasmins/ │ └── type.j ├── d2j-smali/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ ├── antlr4/ │ │ │ └── com/ │ │ │ └── googlecode/ │ │ │ └── d2j/ │ │ │ └── smali/ │ │ │ └── antlr4/ │ │ │ └── Smali.g4 │ │ └── java/ │ │ └── com/ │ │ └── googlecode/ │ │ └── d2j/ │ │ └── smali/ │ │ ├── AntlrSmaliUtil.java │ │ ├── Baksmali.java │ │ ├── BaksmaliCmd.java │ │ ├── BaksmaliCodeDumper.java │ │ ├── BaksmaliDexFileVisitor.java │ │ ├── BaksmaliDumpOut.java │ │ ├── BaksmaliDumper.java │ │ ├── Smali.java │ │ ├── SmaliCmd.java │ │ ├── SmaliCodeVisitor.java │ │ └── Utils.java │ └── test/ │ ├── java/ │ │ └── a/ │ │ ├── BaksmaliTest.java │ │ └── SmaliTest.java │ └── resources/ │ └── a.smali ├── dex-ir/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── com/ │ │ └── googlecode/ │ │ └── dex2jar/ │ │ └── ir/ │ │ ├── ET.java │ │ ├── IrMethod.java │ │ ├── LabelAndLocalMapper.java │ │ ├── LocalVar.java │ │ ├── StmtSearcher.java │ │ ├── StmtTraveler.java │ │ ├── TransformerException.java │ │ ├── Trap.java │ │ ├── TypeClass.java │ │ ├── Util.java │ │ ├── expr/ │ │ │ ├── AbstractInvokeExpr.java │ │ │ ├── ArrayExpr.java │ │ │ ├── BinopExpr.java │ │ │ ├── CastExpr.java │ │ │ ├── Constant.java │ │ │ ├── Exprs.java │ │ │ ├── FieldExpr.java │ │ │ ├── FilledArrayExpr.java │ │ │ ├── InvokeCustomExpr.java │ │ │ ├── InvokeExpr.java │ │ │ ├── InvokePolymorphicExpr.java │ │ │ ├── Local.java │ │ │ ├── NewExpr.java │ │ │ ├── NewMutiArrayExpr.java │ │ │ ├── PhiExpr.java │ │ │ ├── RefExpr.java │ │ │ ├── StaticFieldExpr.java │ │ │ ├── TypeExpr.java │ │ │ ├── UnopExpr.java │ │ │ └── Value.java │ │ ├── stmt/ │ │ │ ├── AssignStmt.java │ │ │ ├── BaseSwitchStmt.java │ │ │ ├── GotoStmt.java │ │ │ ├── IfStmt.java │ │ │ ├── JumpStmt.java │ │ │ ├── LabelStmt.java │ │ │ ├── LookupSwitchStmt.java │ │ │ ├── NopStmt.java │ │ │ ├── ReturnVoidStmt.java │ │ │ ├── Stmt.java │ │ │ ├── StmtList.java │ │ │ ├── Stmts.java │ │ │ ├── TableSwitchStmt.java │ │ │ ├── UnopStmt.java │ │ │ └── VoidInvokeStmt.java │ │ └── ts/ │ │ ├── AggTransformer.java │ │ ├── Cfg.java │ │ ├── CleanLabel.java │ │ ├── ConstTransformer.java │ │ ├── DeadCodeTransformer.java │ │ ├── EndRemover.java │ │ ├── ExceptionHandlerTrim.java │ │ ├── FixVar.java │ │ ├── Ir2JRegAssignTransformer.java │ │ ├── JimpleTransformer.java │ │ ├── MultiArrayTransformer.java │ │ ├── NewTransformer.java │ │ ├── NpeTransformer.java │ │ ├── RemoveConstantFromSSA.java │ │ ├── RemoveLocalFromSSA.java │ │ ├── SSATransformer.java │ │ ├── StatedTransformer.java │ │ ├── Transformer.java │ │ ├── TypeTransformer.java │ │ ├── UnSSATransformer.java │ │ ├── UniqueQueue.java │ │ ├── VoidInvokeTransformer.java │ │ ├── ZeroTransformer.java │ │ ├── an/ │ │ │ ├── AnalyzeValue.java │ │ │ ├── BaseAnalyze.java │ │ │ ├── SimpleLiveAnalyze.java │ │ │ └── SimpleLiveValue.java │ │ └── array/ │ │ ├── ArrayElementTransformer.java │ │ ├── ArrayNullPointerTransformer.java │ │ └── FillArrayTransformer.java │ └── test/ │ └── java/ │ └── com/ │ └── googlecode/ │ └── dex2jar/ │ └── ir/ │ └── test/ │ ├── AggTransformerTest.java │ ├── BaseTransformerTest.java │ ├── ConstTransformerTest.java │ ├── ConstantStringTest.java │ ├── DeadCodeTrnasformerTest.java │ ├── JimpleTransformerTest.java │ ├── RemoveConstantFromSSATest.java │ ├── RemoveLocalFromSSATest.java │ ├── SSATransformerTest.java │ ├── StmtListTest.java │ ├── TypeTransformerTest.java │ ├── UnSSATransformerTransformerTest.java │ └── ZeroTransformerTest.java ├── dex-reader/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── com/ │ │ └── googlecode/ │ │ └── d2j/ │ │ ├── reader/ │ │ │ ├── BaseDexFileReader.java │ │ │ ├── DexFileReader.java │ │ │ ├── MultiDexFileReader.java │ │ │ └── zip/ │ │ │ └── ZipUtil.java │ │ └── util/ │ │ ├── ASMifierAnnotationV.java │ │ ├── ASMifierClassV.java │ │ ├── ASMifierCodeV.java │ │ ├── ASMifierFileV.java │ │ ├── ArrayOut.java │ │ ├── Escape.java │ │ ├── Mutf8.java │ │ ├── Out.java │ │ ├── Utf8Utils.java │ │ └── zip/ │ │ ├── AccessBufByteArrayOutputStream.java │ │ ├── AutoSTOREDZipOutputStream.java │ │ ├── ZipConstants.java │ │ ├── ZipEntry.java │ │ └── ZipFile.java │ └── test/ │ ├── java/ │ │ └── com/ │ │ └── googlecode/ │ │ └── d2j/ │ │ └── reader/ │ │ └── test/ │ │ ├── AsmfierTest.java │ │ ├── BadZipEntryFlagTest.java │ │ └── SkipDupMethod.java │ └── resources/ │ └── i200.dex ├── dex-reader-api/ │ ├── build.gradle │ └── src/ │ └── main/ │ └── java/ │ └── com/ │ └── googlecode/ │ └── d2j/ │ ├── DexConstants.java │ ├── DexException.java │ ├── DexLabel.java │ ├── DexType.java │ ├── Field.java │ ├── Method.java │ ├── MethodHandle.java │ ├── Proto.java │ ├── Visibility.java │ ├── node/ │ │ ├── DexAnnotationNode.java │ │ ├── DexClassNode.java │ │ ├── DexCodeNode.java │ │ ├── DexDebugNode.java │ │ ├── DexFieldNode.java │ │ ├── DexFileNode.java │ │ ├── DexMethodNode.java │ │ ├── TryCatchNode.java │ │ ├── analysis/ │ │ │ ├── DvmFrame.java │ │ │ └── DvmInterpreter.java │ │ └── insn/ │ │ ├── AbstractMethodStmtNode.java │ │ ├── BaseSwitchStmtNode.java │ │ ├── ConstStmtNode.java │ │ ├── DexLabelStmtNode.java │ │ ├── DexStmtNode.java │ │ ├── FieldStmtNode.java │ │ ├── FillArrayDataStmtNode.java │ │ ├── FilledNewArrayStmtNode.java │ │ ├── JumpStmtNode.java │ │ ├── MethodCustomStmtNode.java │ │ ├── MethodPolymorphicStmtNode.java │ │ ├── MethodStmtNode.java │ │ ├── PackedSwitchStmtNode.java │ │ ├── SparseSwitchStmtNode.java │ │ ├── Stmt0RNode.java │ │ ├── Stmt1RNode.java │ │ ├── Stmt2R1NNode.java │ │ ├── Stmt2RNode.java │ │ ├── Stmt3RNode.java │ │ └── TypeStmtNode.java │ ├── reader/ │ │ ├── CFG.java │ │ ├── InstructionFormat.java │ │ ├── InstructionIndexType.java │ │ └── Op.java │ └── visitors/ │ ├── DexAnnotationAble.java │ ├── DexAnnotationVisitor.java │ ├── DexClassVisitor.java │ ├── DexCodeVisitor.java │ ├── DexDebugVisitor.java │ ├── DexFieldVisitor.java │ ├── DexFileVisitor.java │ └── DexMethodVisitor.java ├── dex-tools/ │ ├── build.gradle │ ├── open-source-license.txt │ └── src/ │ ├── main/ │ │ ├── assemble/ │ │ │ └── package.xml │ │ ├── bin_gen/ │ │ │ ├── bat_template │ │ │ ├── class.cfg │ │ │ ├── d2j_invoke.bat │ │ │ ├── d2j_invoke.sh │ │ │ └── sh_template │ │ ├── java/ │ │ │ └── com/ │ │ │ └── googlecode/ │ │ │ ├── d2j/ │ │ │ │ ├── signapk/ │ │ │ │ │ ├── AbstractJarSign.java │ │ │ │ │ ├── Base64.java │ │ │ │ │ ├── SunJarSignImpl.java │ │ │ │ │ └── TinySignImpl.java │ │ │ │ ├── tools/ │ │ │ │ │ └── jar/ │ │ │ │ │ ├── BaseWeaver.java │ │ │ │ │ ├── ClassInfo.java │ │ │ │ │ ├── DexWeaver.java │ │ │ │ │ ├── InitOut.java │ │ │ │ │ ├── InvocationWeaver.java │ │ │ │ │ ├── ScanBridgeAdapter.java │ │ │ │ │ └── WebApp.java │ │ │ │ └── util/ │ │ │ │ └── AccUtils.java │ │ │ └── dex2jar/ │ │ │ ├── bin_gen/ │ │ │ │ └── BinGen.java │ │ │ └── tools/ │ │ │ ├── ApkSign.java │ │ │ ├── AsmVerify.java │ │ │ ├── BaksmaliBaseDexExceptionHandler.java │ │ │ ├── ClassVersionSwitch.java │ │ │ ├── DeObfInitCmd.java │ │ │ ├── DecryptStringCmd.java │ │ │ ├── Dex2jarCmd.java │ │ │ ├── Dex2jarMultiThreadCmd.java │ │ │ ├── DexRecomputeChecksum.java │ │ │ ├── DexWeaverCmd.java │ │ │ ├── ExtractOdexFromCoredumpCmd.java │ │ │ ├── GenerateCompileStubFromOdex.java │ │ │ ├── Jar2Dex.java │ │ │ ├── JarAccessCmd.java │ │ │ ├── JarWeaverCmd.java │ │ │ ├── StdApkCmd.java │ │ │ └── to/ │ │ │ └── Do.java │ │ └── resources/ │ │ └── com/ │ │ └── googlecode/ │ │ └── dex2jar/ │ │ └── tools/ │ │ ├── ApkSign.cer │ │ └── ApkSign.private │ └── test/ │ ├── java/ │ │ └── com/ │ │ └── googlecode/ │ │ └── d2j/ │ │ └── tools/ │ │ └── jar/ │ │ ├── MethodInvocation.java │ │ └── test/ │ │ ├── DexWaveTest.java │ │ └── WaveTest.java │ └── resources/ │ └── weave/ │ ├── a-after.j │ ├── a-before.j │ ├── a-gen.j │ ├── b-after.j │ ├── b-before.j │ ├── b-gen.j │ ├── c-after.j │ ├── c-before.j │ ├── c-gen.j │ └── smali/ │ ├── a-after.smali │ ├── a-before.smali │ ├── a-gen.smali │ ├── b-after.smali │ ├── b-before.smali │ └── b-gen.smali ├── dex-translator/ │ ├── build.gradle │ ├── libs/ │ │ └── dx-27.0.3.jar │ └── src/ │ ├── main/ │ │ └── java/ │ │ ├── com/ │ │ │ └── googlecode/ │ │ │ └── d2j/ │ │ │ ├── asm/ │ │ │ │ └── LdcOptimizeAdapter.java │ │ │ ├── converter/ │ │ │ │ ├── Dex2IRConverter.java │ │ │ │ ├── IR2JConverter.java │ │ │ │ └── J2IRConverter.java │ │ │ ├── dex/ │ │ │ │ ├── BaseDexExceptionHandler.java │ │ │ │ ├── ClassVisitorFactory.java │ │ │ │ ├── Dex2Asm.java │ │ │ │ ├── Dex2IrAdapter.java │ │ │ │ ├── Dex2jar.java │ │ │ │ ├── DexExceptionHandler.java │ │ │ │ ├── DexFix.java │ │ │ │ ├── ExDex2Asm.java │ │ │ │ ├── LambadaNameSafeClassAdapter.java │ │ │ │ └── V3.java │ │ │ └── util/ │ │ │ └── Types.java │ │ └── org/ │ │ └── objectweb/ │ │ └── asm/ │ │ └── AsmBridge.java │ └── test/ │ ├── java/ │ │ ├── com/ │ │ │ └── googlecode/ │ │ │ └── dex2jar/ │ │ │ └── test/ │ │ │ ├── ASMifierTest.java │ │ │ ├── ArrayTypeTest.java │ │ │ ├── AutoCastTest.java │ │ │ ├── D2jTest.java │ │ │ ├── DexTranslatorRunner.java │ │ │ ├── EmptyTrapTest.java │ │ │ ├── I101Test.java │ │ │ ├── I121Test.java │ │ │ ├── I168Test.java │ │ │ ├── I63Test.java │ │ │ ├── Issue71Test.java │ │ │ ├── OptSyncTest.java │ │ │ ├── ResTest.java │ │ │ ├── Smali2jTest.java │ │ │ ├── TestDexClassV.java │ │ │ ├── TestUtils.java │ │ │ └── ZeroTest.java │ │ ├── dex2jar/ │ │ │ └── gen/ │ │ │ └── FTPClient__parsePassiveModeReply.java │ │ └── res/ │ │ ├── ArrayRes.java │ │ ├── ChineseRes.java │ │ ├── ConstValues.java │ │ ├── ExceptionRes.java │ │ ├── Gh28Type.java │ │ ├── I142_annotation_default.java │ │ ├── I56_AccessFlag.java │ │ ├── I71.java │ │ ├── I73.java │ │ ├── I88.java │ │ ├── LongDoubleRes.java │ │ ├── NoEndRes.java │ │ ├── NullZero.java │ │ ├── OptimizeSynchronized.java │ │ ├── PopRes.java │ │ ├── ResChild.java │ │ ├── ResParent.java │ │ ├── SwitchRes.java │ │ ├── U0000String.java │ │ ├── WideRes.java │ │ └── i55/ │ │ ├── AAbstractClass.java │ │ ├── AClass.java │ │ └── AInterface.java │ └── resources/ │ ├── dexes/ │ │ └── i_jetty.dex │ └── smalis/ │ ├── 0zs.smali │ ├── ML.smali │ ├── bb-1-can-not-merge-z-and-i.smali │ ├── bb-5-ArrayIndexOutOfBoundsOnType.smali │ ├── empty-try-catch-with-goto-head.smali │ ├── gh-issue-186.smali │ ├── gh-issue-4.smali │ ├── goto-first-label.smali │ ├── i230.smali │ ├── int-or-boolean.smali │ ├── issue-220-219-uninit-reg.smali │ ├── loop-enclosing-class.smali │ ├── mayfail-method-code-too-large.smali │ ├── negative-array-size.smali │ ├── npe-cause-trap-fail.smali │ ├── opt-lock.smali │ ├── useless-new.smali │ └── writeString.smali ├── dex-writer/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── com/ │ │ └── googlecode/ │ │ └── d2j/ │ │ └── dex/ │ │ └── writer/ │ │ ├── AnnotationWriter.java │ │ ├── CantNotFixContentException.java │ │ ├── ClassWriter.java │ │ ├── CodeWriter.java │ │ ├── DexFileWriter.java │ │ ├── DexWriteException.java │ │ ├── FieldWriter.java │ │ ├── MethodWriter.java │ │ ├── ann/ │ │ │ ├── Alignment.java │ │ │ ├── Idx.java │ │ │ └── Off.java │ │ ├── ev/ │ │ │ ├── EncodedAnnotation.java │ │ │ ├── EncodedArray.java │ │ │ └── EncodedValue.java │ │ ├── insn/ │ │ │ ├── Insn.java │ │ │ ├── JumpOp.java │ │ │ ├── Label.java │ │ │ ├── OpInsn.java │ │ │ └── PreBuildInsn.java │ │ ├── io/ │ │ │ ├── ByteBufferOut.java │ │ │ └── DataOut.java │ │ └── item/ │ │ ├── AnnotationItem.java │ │ ├── AnnotationSetItem.java │ │ ├── AnnotationSetRefListItem.java │ │ ├── AnnotationsDirectoryItem.java │ │ ├── BaseItem.java │ │ ├── ClassDataItem.java │ │ ├── ClassDefItem.java │ │ ├── CodeItem.java │ │ ├── ConstPool.java │ │ ├── DebugInfoItem.java │ │ ├── EncodedArrayItem.java │ │ ├── FieldIdItem.java │ │ ├── HeadItem.java │ │ ├── MapListItem.java │ │ ├── MethodIdItem.java │ │ ├── ProtoIdItem.java │ │ ├── SectionItem.java │ │ ├── StringDataItem.java │ │ ├── StringIdItem.java │ │ ├── TypeIdItem.java │ │ └── TypeListItem.java │ └── test/ │ └── java/ │ └── a/ │ ├── AppWriterTest.java │ └── CpStringTest.java ├── gradle/ │ └── wrapper/ │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle
Showing preview only (219K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2698 symbols across 325 files)
FILE: d2j-base-cmd/src/main/java/com/googlecode/dex2jar/tools/BaseCmd.java
class BaseCmd (line 36) | public abstract class BaseCmd {
method getBaseName (line 37) | public static String getBaseName(String fn) {
method getBaseName (line 42) | public static String getBaseName(Path fn) {
type FileVisitorX (line 46) | public interface FileVisitorX {
method visitFile (line 49) | void visitFile(Path file, String relative) throws IOException;
method walkFileTreeX (line 52) | public static void walkFileTreeX(final Path base, final FileVisitorX f...
method walkJarOrDir (line 62) | public static void walkJarOrDir(final Path in, final FileVisitorX fv) ...
method createParentDirectories (line 72) | public static void createParentDirectories(Path p) throws IOException {
method createZip (line 80) | public static FileSystem createZip(Path output) throws IOException {
method openZip (line 96) | public static FileSystem openZip(Path in) throws IOException {
class HelpException (line 106) | @SuppressWarnings("serial")
method HelpException (line 109) | public HelpException() {
method HelpException (line 113) | public HelpException(String message) {
class Option (line 135) | static protected class Option implements Comparable<Option> {
method compareTo (line 144) | @Override
method s (line 159) | private static int s(String a, String b) {
method getOptAndLongOpt (line 171) | public String getOptAndLongOpt() {
method BaseCmd (line 216) | public BaseCmd() {
method BaseCmd (line 219) | public BaseCmd(String cmdLineSyntax, String header) {
method BaseCmd (line 229) | public BaseCmd(String cmdName, String cmdSyntax, String header) {
method collectRequriedOptions (line 236) | private Set<Option> collectRequriedOptions(Map<String, Option> optMap) {
method convert (line 247) | @SuppressWarnings({ "rawtypes", "unchecked" })
method doCommandLine (line 284) | protected abstract void doCommandLine() throws Exception;
method doMain (line 286) | public void doMain(String... args) {
method getVersionString (line 302) | protected String getVersionString() {
method initOptionFromClass (line 306) | protected void initOptionFromClass(Class<?> clz) {
method fromCamel (line 381) | private static String fromCamel(String name) {
method checkConflict (line 399) | private void checkConflict(Option option, String key) {
method initOptions (line 409) | protected void initOptions() {
method main (line 413) | public static void main(String... args) throws Exception {
method parseSetArgs (line 431) | protected void parseSetArgs(String... args) throws IllegalArgumentExce...
method usage (line 485) | protected void usage() {
FILE: d2j-j6/src/main/java/j6/Files.java
class Files (line 7) | public class Files {
method toPath (line 8) | public static Object toPath(File file) throws Throwable {
FILE: d2j-j6/src/main/java/j6/Thro.java
class Thro (line 8) | public class Thro {
method addSuppressed (line 12) | public static void addSuppressed(Throwable a, Throwable b) {
method getSuppressed (line 21) | public static Throwable[] getSuppressed(Throwable a) {
FILE: d2j-j6/src/main/java/pxb/java/nio/charset/StandardCharsets.java
class StandardCharsets (line 5) | public class StandardCharsets {
FILE: d2j-j6/src/main/java/pxb/java/nio/file/CopyOption.java
type CopyOption (line 3) | public interface CopyOption {
FILE: d2j-j6/src/main/java/pxb/java/nio/file/FileSystem.java
class FileSystem (line 5) | public abstract class FileSystem implements Closeable {
method getPath (line 6) | public abstract Path getPath(String first, String... more);
FILE: d2j-j6/src/main/java/pxb/java/nio/file/FileVisitResult.java
type FileVisitResult (line 4) | public enum FileVisitResult {
FILE: d2j-j6/src/main/java/pxb/java/nio/file/FileVisitor.java
type FileVisitor (line 6) | public interface FileVisitor<T> {
method preVisitDirectory (line 8) | FileVisitResult preVisitDirectory(T dir, BasicFileAttributes attrs)
method visitFile (line 11) | FileVisitResult visitFile(T file, BasicFileAttributes attrs)
method visitFileFailed (line 14) | FileVisitResult visitFileFailed(T file, IOException exc)
method postVisitDirectory (line 17) | FileVisitResult postVisitDirectory(T dir, IOException exc)
FILE: d2j-j6/src/main/java/pxb/java/nio/file/Files.java
class Files (line 12) | public class Files {
method write (line 13) | public static Path write(Path path, byte[] bytes, OpenOption... options)
method readAllBytes (line 19) | public static byte[] readAllBytes(Path path) throws IOException {
method isDirectory (line 23) | public static boolean isDirectory(Path path, LinkOption... options) {
method exists (line 27) | public static boolean exists(Path path, LinkOption... options) {
method newOutputStream (line 31) | public static OutputStream newOutputStream(Path path, OpenOption... op...
method newInputStream (line 36) | public static InputStream newInputStream(Path path, OpenOption... opti...
method deleteIfExists (line 41) | public static boolean deleteIfExists(Path path) throws IOException {
method createDirectories (line 45) | public static Path createDirectories(Path dir, FileAttribute... attrs)
method walkFileTree (line 50) | public static Path walkFileTree(Path start, FileVisitor<? super Path> ...
method createTempFile (line 56) | public static Path createTempFile(String prefix,
method copy (line 63) | public static Path copy(Path source, Path target, CopyOption... option...
FILE: d2j-j6/src/main/java/pxb/java/nio/file/LinkOption.java
type LinkOption (line 3) | public interface LinkOption {
FILE: d2j-j6/src/main/java/pxb/java/nio/file/OpenOption.java
type OpenOption (line 3) | public interface OpenOption {
FILE: d2j-j6/src/main/java/pxb/java/nio/file/Path.java
type Path (line 8) | public interface Path {
method resolve (line 10) | Path resolve(String other);
method getFileName (line 12) | Path getFileName();
method getParent (line 14) | Path getParent();
method toFile (line 16) | File toFile();
method toString (line 18) | String toString();
method _readAllBytes (line 20) | byte[] _readAllBytes() throws IOException;
method _newOutputStream (line 22) | OutputStream _newOutputStream() throws IOException;
method _isDirectory (line 24) | boolean _isDirectory();
method _createDirectories (line 26) | Path _createDirectories() throws IOException;
method _deleteIfExists (line 28) | boolean _deleteIfExists();
method _exists (line 30) | boolean _exists();
method _write (line 32) | void _write(byte[] b) throws IOException;
method _walkFileTree (line 34) | void _walkFileTree(FileVisitor<? super Path> visitor) throws IOException;
method relativize (line 36) | Path relativize(Path other);
method _newInputStream (line 38) | InputStream _newInputStream() throws IOException;
FILE: d2j-j6/src/main/java/pxb/java/nio/file/SimpleFileVisitor.java
class SimpleFileVisitor (line 7) | public class SimpleFileVisitor<T> implements FileVisitor<T> {
method preVisitDirectory (line 8) | @Override
method visitFile (line 14) | @Override
method visitFileFailed (line 20) | @Override
method postVisitDirectory (line 26) | @Override
FILE: d2j-j6/src/main/java/pxb/java/nio/file/attribute/BasicFileAttributes.java
type BasicFileAttributes (line 3) | public interface BasicFileAttributes {
FILE: d2j-j6/src/main/java/pxb/java/nio/file/attribute/FileAttribute.java
type FileAttribute (line 3) | public interface FileAttribute<T> {
FILE: d2j-j6/src/main/java/pxb/java/nio/file/spi/FileSystemProvider.java
class FileSystemProvider (line 13) | public abstract class FileSystemProvider {
method copy (line 14) | public static void copy(InputStream is, OutputStream os) throws IOExce...
method readFile (line 21) | public static byte[] readFile(File in) throws IOException {
method readIs (line 29) | public static byte[] readIs(InputStream is) throws IOException {
method writeFile (line 35) | public static void writeFile(byte[] data, File out) throws IOException {
method installedProviders (line 44) | public static List<FileSystemProvider> installedProviders() {
method getScheme (line 48) | public abstract String getScheme();
method newFileSystem (line 50) | public abstract FileSystem newFileSystem(Path path, Map<String, ?> env...
class CreatZipFS (line 53) | static class CreatZipFS extends FileSystem {
class CreateZipPath (line 56) | class CreateZipPath implements Path {
method CreateZipPath (line 60) | public CreateZipPath(String s, String displayName) {
method resolve (line 65) | @Override
method getFileName (line 73) | @Override
method toString (line 87) | @Override
method getParent (line 92) | @Override
method toFile (line 101) | @Override
method _readAllBytes (line 106) | @Override
method _newOutputStream (line 111) | @Override
method _isDirectory (line 123) | @Override
method _createDirectories (line 128) | @Override
method _deleteIfExists (line 134) | @Override
method _exists (line 139) | @Override
method _write (line 144) | @Override
method _walkFileTree (line 151) | @Override
method relativize (line 156) | @Override
method _newInputStream (line 163) | @Override
method createDir0 (line 169) | private boolean createDir0(String path) throws IOException {
method exists (line 187) | private boolean exists(String path) {
method CreatZipFS (line 191) | public CreatZipFS(ZipOutputStream zipFile) {
method close (line 195) | @Override
method getPath (line 200) | @Override
class ReadZipPath (line 206) | static class ReadZipPath implements Path {
method ReadZipPath (line 211) | public ReadZipPath(ZipFile zipFile, String path) {
method ReadZipPath (line 215) | public ReadZipPath(ZipFile zipFile, String path, String substring) {
method resolve (line 221) | @Override
method getFileName (line 230) | @Override
method getParent (line 244) | @Override
method toFile (line 254) | @Override
method toString (line 259) | @Override
method _readAllBytes (line 264) | @Override
method _newOutputStream (line 270) | @Override
method _isDirectory (line 275) | @Override
method _createDirectories (line 281) | @Override
method _deleteIfExists (line 286) | @Override
method _exists (line 291) | @Override
method _write (line 297) | @Override
method _walkFileTree (line 302) | @Override
method relativize (line 316) | @Override
method _newInputStream (line 323) | @Override
class ReadZipFS (line 330) | static class ReadZipFS extends FileSystem {
method ReadZipFS (line 333) | public ReadZipFS(ZipFile zipFile) {
method close (line 337) | @Override
method getPath (line 342) | @Override
class ZipFSP (line 348) | static class ZipFSP extends FileSystemProvider {
method getScheme (line 350) | @Override
method newFileSystem (line 355) | @Override
class DefPath (line 365) | public static class DefPath implements Path {
method DefPath (line 369) | public DefPath(File file) {
method DefPath (line 373) | public DefPath(File file, String name) {
method toString (line 378) | @Override
method resolve (line 383) | @Override
method getFileName (line 388) | @Override
method getParent (line 393) | @Override
method toFile (line 398) | @Override
method _readAllBytes (line 403) | @Override
method _newOutputStream (line 408) | @Override
method _isDirectory (line 413) | @Override
method _createDirectories (line 418) | @Override
method _deleteIfExists (line 424) | @Override
method _exists (line 429) | @Override
method _write (line 434) | @Override
method _walkFileTree (line 441) | @Override
method walk0 (line 446) | public static void walk0(DefPath dir, FileVisitor<? super Path> visi...
method relativize (line 461) | @Override
method _newInputStream (line 468) | @Override
class DirFSP (line 474) | static class DirFSP extends FileSystemProvider {
method getScheme (line 476) | @Override
method newFileSystem (line 481) | @Override
FILE: d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jar2JasminCmd.java
class Jar2JasminCmd (line 31) | @Syntax(cmd = "d2j-jar2jasmin", syntax = "[options] <jar>", desc = "Disa...
method main (line 42) | public static void main(String... args) {
method doCommandLine (line 46) | @Override
method disassemble0 (line 81) | private void disassemble0(Path in, final Path output) throws IOExcepti...
method travelFileTree (line 93) | private void travelFileTree(Path in, final Path output) throws IOExcep...
method disassemble1 (line 105) | private void disassemble1(Path file, Path output) throws IOException {
FILE: d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jasmin2JarCmd.java
class Jasmin2JarCmd (line 35) | @BaseCmd.Syntax(cmd = "d2j-jasmin2jar", syntax = "[options] <jar>", desc...
method main (line 58) | public static void main(String... args) throws ClassNotFoundException,...
method doCommandLine (line 62) | @Override
method assemble0 (line 100) | private void assemble0(Path in, Path output) throws IOException, URISy...
method travelFileTree (line 112) | private void travelFileTree(Path in, final Path output) throws IOExcep...
method assemble1 (line 124) | private void assemble1(Path file, Path output) throws IOException {
FILE: d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/JasminDumper.java
class JasminDumper (line 91) | public class JasminDumper implements Opcodes {
method JasminDumper (line 95) | public JasminDumper(PrintWriter pw) {
method printIdAfterAccess (line 109) | static void printIdAfterAccess(PrintWriter out, String id) {
method dump (line 119) | public void dump(ClassNode cn) {
method println (line 512) | protected void println(final String directive, final String arg) {
method access_clz (line 518) | protected String access_clz(final int access) {
method access_fld (line 552) | protected String access_fld(final int access) {
method access_mtd (line 583) | protected String access_mtd(final int access) {
method print (line 624) | protected void print(final int opcode) {
method print (line 628) | protected void print(final Object cst) {
method print (line 669) | protected void print(final Label l) {
method print (line 678) | protected void print(final LabelNode l) {
method printAnnotation (line 682) | protected void printAnnotation(final AnnotationNode n, final int visib...
method printAnnotationValue (line 705) | protected void printAnnotationValue(final Object value) {
method printAnnotationArrayValue (line 863) | protected void printAnnotationArrayValue(final Object value) {
method printFrameType (line 885) | protected void printFrameType(final Object type) {
FILE: d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jasmins.java
class Jasmins (line 30) | public class Jasmins {
method parse (line 31) | public static ClassNode parse(Path file) throws IOException {
method parse (line 39) | public static ClassNode parse(String fileName, Reader bufferedReader) ...
method parse (line 48) | public static ClassNode parse(String fileName, InputStream is) throws ...
FILE: d2j-jasmin/src/test/java/com/googlecode/d2j/tools/jar/test/Jasmin2jTest.java
class Jasmin2jTest (line 42) | @RunWith(Jasmin2jTest.S.class)
class S (line 45) | public static class S extends ParentRunner<Path> {
method S (line 47) | public S(Class<?> klass) throws InitializationError {
method init (line 55) | public void init(final Class<?> testClass) throws InitializationError {
method getChildren (line 81) | @Override
method describeChild (line 86) | @Override
method runChild (line 91) | @Override
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/AntlrSmaliUtil.java
class AntlrSmaliUtil (line 19) | public class AntlrSmaliUtil {
method acceptFile (line 20) | public static void acceptFile(SmaliParser.SFileContext ctx, DexFileVis...
method acceptMethod (line 53) | private static void acceptMethod(List<SmaliParser.SMethodContext> sMet...
method acceptMethod (line 62) | public static void acceptMethod(SmaliParser.SMethodContext ctx, String...
class M (line 87) | private static class M {
method setNameByIdx (line 93) | void setNameByIdx(int index, String name) {
method regToParamIdx (line 99) | int regToParamIdx(int reg) {
method pareReg (line 107) | int pareReg(String str) {
method M (line 116) | M(Method method, int totals, int ins, boolean isStatic) {
method acceptCode (line 138) | private static void acceptCode(SmaliParser.SMethodContext ctx, final M...
method findTotalRegisters (line 551) | private static int findTotalRegisters(SmaliParser.SMethodContext ctx, ...
method acceptParameter (line 570) | private static void acceptParameter(List<SmaliParser.SParameterContext...
method acceptField (line 607) | private static void acceptField(List<SmaliParser.SFieldContext> sField...
method acceptField (line 616) | public static void acceptField(SmaliParser.SFieldContext ctx, String c...
method parseBaseValue (line 637) | private static Object parseBaseValue(SmaliParser.SBaseValueContext ctx) {
method acceptAnnotations (line 683) | private static void acceptAnnotations(List<SmaliParser.SAnnotationCont...
method acceptAnnotation (line 706) | private static void acceptAnnotation(DexAnnotationVisitor dexAnnotatio...
method collectAccess (line 746) | static private int collectAccess(SmaliParser.SAccListContext ctx) {
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/Baksmali.java
class Baksmali (line 28) | public class Baksmali {
method Baksmali (line 29) | private Baksmali() {
method from (line 32) | public static Baksmali from(byte[] in) throws IOException {
method from (line 36) | public static Baksmali from(ByteBuffer in) throws IOException {
method from (line 40) | public static Baksmali from(DexFileReader reader) {
method from (line 44) | public static Baksmali from(File in) throws IOException {
method from (line 48) | public static Baksmali from(Path in) throws IOException {
method from (line 52) | public static Baksmali from(InputStream in) throws IOException {
method from (line 56) | public static Baksmali from(String in) throws IOException {
method Baksmali (line 65) | private Baksmali(DexFileReader reader) {
method noDebug (line 76) | public Baksmali noDebug() {
method noParameterRegisters (line 88) | public Baksmali noParameterRegisters() {
method to (line 93) | public void to(final File dir) {
method to (line 97) | public void to(final Path base) {
method useLocals (line 109) | public Baksmali useLocals() {
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliCmd.java
class BaksmaliCmd (line 10) | @Syntax(cmd = "d2j-baksmali", syntax = "[options] <dex>", desc = "disass...
method main (line 23) | public static void main(String[] args) {
method doCommandLine (line 27) | @Override
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliCodeDumper.java
class BaksmaliCodeDumper (line 29) | class BaksmaliCodeDumper extends DexCodeVisitor {
method BaksmaliCodeDumper (line 38) | public BaksmaliCodeDumper(Out out, boolean useParameterRegisters, bool...
class PackedSwitchStmt (line 50) | class PackedSwitchStmt {
method PackedSwitchStmt (line 55) | public PackedSwitchStmt(int first_case, DexLabel[] labels) {
class SparseSwitchStmt (line 62) | class SparseSwitchStmt {
method SparseSwitchStmt (line 67) | public SparseSwitchStmt(int[] cases, DexLabel[] labels) {
method reg (line 76) | String reg(int rdx) {
method visitFillArrayDataStmt (line 83) | @Override
method visitConstStmt (line 92) | @SuppressWarnings("incomplete-switch")
method visitEnd (line 121) | @Override
method visitFieldStmt (line 235) | @Override
method visitFilledNewArrayStmt (line 244) | @Override
method visitJumpStmt (line 269) | @Override
method visitStartLocal (line 281) | @Override
method visitPrologue (line 291) | @Override
method visitEpiogue (line 296) | @Override
method visitLineNumber (line 301) | @Override
method visitEndLocal (line 306) | @Override
method visitRestartLocal (line 311) | @Override
method visitLabel (line 317) | @Override
method visitDebug (line 330) | @Override
method visitMethodStmt (line 335) | @Override
method visitMethodStmt (line 361) | @Override
method visitMethodStmt (line 387) | @Override
method visitPackedSwitchStmt (line 419) | @Override
method visitRegister (line 428) | @Override
method visitSparseSwitchStmt (line 438) | @Override
method visitStmt0R (line 447) | @Override
method visitStmt1R (line 456) | @Override
method visitStmt2R (line 461) | @Override
method visitStmt2R1N (line 466) | @Override
method visitStmt3R (line 471) | @Override
method visitTryCatch (line 476) | @Override
method visitTypeStmt (line 489) | @Override
method xLabel (line 498) | String xLabel(DexLabel d) {
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliDexFileVisitor.java
class BaksmaliDexFileVisitor (line 15) | public class BaksmaliDexFileVisitor extends DexFileVisitor {
method BaksmaliDexFileVisitor (line 21) | public BaksmaliDexFileVisitor(Path dir, BaksmaliDumper bs) {
method rebuildFileName (line 28) | protected String rebuildFileName(String s) {
method visit (line 40) | @Override
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliDumpOut.java
class BaksmaliDumpOut (line 24) | public class BaksmaliDumpOut implements Out {
method BaksmaliDumpOut (line 29) | public BaksmaliDumpOut(BufferedWriter writer) {
method BaksmaliDumpOut (line 33) | public BaksmaliDumpOut(String indent, BufferedWriter writer) {
method pop (line 39) | @Override
method push (line 44) | @Override
method s (line 49) | @Override
method s (line 62) | @Override
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliDumper.java
class BaksmaliDumper (line 32) | public class BaksmaliDumper implements DexConstants {
method BaksmaliDumper (line 46) | public BaksmaliDumper() {
method BaksmaliDumper (line 49) | public BaksmaliDumper(boolean useParameterRegisters, boolean useLocals) {
method isAccessWords (line 54) | private static boolean isAccessWords(String name) {
method escape0 (line 58) | static void escape0(final StringBuilder buf, char c) {
method escapeType (line 84) | static String escapeType(String id) {
method escapeId0 (line 90) | static void escapeId0(StringBuilder sb, String id) {
method escapeId (line 97) | static String escapeId(String id) {
method escape1 (line 103) | static void escape1(final StringBuilder buf, char c) {
method escapeType0 (line 111) | static void escapeType0(StringBuilder sb, String id) {
method escapeMethod (line 122) | static String escapeMethod(Method method) {
method escapeMethodDesc (line 125) | static String escapeMethodDesc(Method m) {
method escapeMethodDesc (line 128) | static String escapeMethodDesc(Proto m) {
method appendAccess (line 139) | static void appendAccess(final int access, final StringBuilder sb) {
method escape (line 198) | static void escape(final StringBuilder buf, final String s) {
method escapeValue (line 206) | static String escapeValue(Object obj) {
method escapeMethodHandle (line 278) | private static String escapeMethodHandle(MethodHandle obj) {
method escapeField (line 304) | public static String escapeField(Field f) {
method dumpAnns (line 312) | private static void dumpAnns(List<DexAnnotationNode> anns, Out out) {
method dumpItem (line 318) | private static void dumpItem(String name, Object o, Out out, boolean a...
method dumpAnn (line 368) | private static void dumpAnn(DexAnnotationNode ann, Out out) {
method baksmaliClass (line 378) | public void baksmaliClass(DexClassNode n, BufferedWriter writer) {
method baksmaliClass (line 382) | public void baksmaliClass(DexClassNode n, Out out) {
method baksmaliMethod (line 433) | public void baksmaliMethod(DexMethodNode m, BufferedWriter writer) {
method baksmaliMethod (line 437) | public void baksmaliMethod(DexMethodNode m, Out out) {
method baksmaliCode (line 495) | public void baksmaliCode(DexMethodNode methodNode, DexCodeNode codeNod...
method accept (line 554) | void accept(Out out, DexCodeNode code, DexCodeVisitor v) {
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/Smali.java
class Smali (line 37) | public class Smali {
method smaliFile (line 38) | public static void smaliFile(Path path, DexFileVisitor dcv) throws IOE...
method smaliFile (line 46) | public static void smaliFile(String name, String buff, DexFileVisitor ...
method smaliFile (line 52) | public static void smaliFile(String name, InputStream in, DexFileVisit...
method smaliFile2Node (line 60) | public static DexClassNode smaliFile2Node(String name, InputStream in)...
method smaliFile2Node (line 66) | public static DexClassNode smaliFile2Node(String name, String buff) th...
method smali0 (line 72) | private static void smali0(DexFileVisitor dcv, CharStream is) throws I...
method smaliFile (line 82) | public static void smaliFile(String fileName, char[] data, DexFileVisi...
method smali (line 89) | public static void smali(Path base, final DexFileVisitor dfv) throws I...
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/SmaliCmd.java
class SmaliCmd (line 12) | @Syntax(cmd = "d2j-smali", syntax = "[options] [--] [<smali-file>|folder...
method main (line 25) | public static void main(String[] args) {
method doCommandLine (line 29) | @Override
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/SmaliCodeVisitor.java
class SmaliCodeVisitor (line 29) | public class SmaliCodeVisitor extends DexCodeNode {
method SmaliCodeVisitor (line 31) | public SmaliCodeVisitor(DexCodeVisitor visitor) {
method visitConstStmt (line 35) | @Override
class ArrayDataStmt (line 80) | public static class ArrayDataStmt extends DexStmtNode {
method ArrayDataStmt (line 84) | public ArrayDataStmt(int length, byte[] obj) {
method accept (line 90) | @Override
class PackedSwitchStmt (line 96) | public static class PackedSwitchStmt extends DexStmtNode {
method PackedSwitchStmt (line 100) | public PackedSwitchStmt(int reg, DexLabel[] labels) {
method accept (line 106) | @Override
class SparseSwitchStmt (line 111) | public static class SparseSwitchStmt extends DexStmtNode {
method SparseSwitchStmt (line 115) | public SparseSwitchStmt(int[] cases, DexLabel[] labels) {
method accept (line 121) | @Override
method visitEnd (line 128) | @Override
method addCare (line 139) | private void addCare(DexStmtNode stmt) {
method dArrayData (line 144) | void dArrayData(int length, byte[] obj) {
method dPackedSwitch (line 148) | void dPackedSwitch(int first, DexLabel[] labels) {
method dSparseSwitch (line 152) | void dSparseSwitch(int[] cases, DexLabel[] labels) {
method findLabelIndex (line 156) | int findLabelIndex(DexLabel label) {
method visitF31tStmt (line 170) | void visitF31tStmt(final Op op, final int reg, final DexLabel label) {
method visitLabel (line 241) | @Override
FILE: d2j-smali/src/main/java/com/googlecode/d2j/smali/Utils.java
class Utils (line 16) | public class Utils implements DexConstants {
method doAccept (line 18) | public static void doAccept(DexAnnotationVisitor dexAnnotationVisitor,...
method getAcc (line 40) | public static int getAcc(String name) {
method listDesc (line 83) | public static List<String> listDesc(String desc) {
method toTypeList (line 137) | public static String[] toTypeList(String s) {
method parseByte (line 141) | static public Byte parseByte(String str) {
method parseShort (line 145) | static public Short parseShort(String str) {
method parseLong (line 149) | static public Long parseLong(String str) {
method parseFloat (line 182) | static public float parseFloat(String str) {
method parseDouble (line 206) | static public double parseDouble(String str) {
method parseInt (line 230) | static public int parseInt(String str, int start, int end) {
method parseInt (line 258) | static public int parseInt(String str) {
method unescapeStr (line 262) | public static String unescapeStr(String str) {
method unescapeChar (line 266) | public static Character unescapeChar(String str) {
method toIntArray (line 270) | public static int[] toIntArray(List<String> ss) {
method toByteArray (line 278) | public static byte[] toByteArray(List<Object> ss) {
method getOp (line 294) | static public Op getOp(String name) {
method unEscape (line 298) | public static String unEscape(String str) {
method unEscapeId (line 302) | public static String unEscapeId(String str) {
method findString (line 306) | public static int findString(String str, int start, int end, char dEnd) {
method unEscape0 (line 353) | public static String unEscape0(String str, int start, int end) {
class Ann (line 424) | public static class Ann {
method put (line 428) | public void put(String name, Object value) {
method getAnnVisibility (line 433) | public static Visibility getAnnVisibility(String name) {
method methodIns (line 437) | public static int methodIns(Method m, boolean isStatic) {
method reg2ParamIdx (line 453) | public static int reg2ParamIdx(Method m, int reg, int locals, boolean ...
method parseMethodAndUnescape (line 480) | public static Method parseMethodAndUnescape(String owner, String part)...
method parseMethodAndUnescape (line 499) | public static Method parseMethodAndUnescape(String full) throws Runtim...
method parseFieldAndUnescape (line 508) | public static Field parseFieldAndUnescape(String owner, String part) t...
method parseFieldAndUnescape (line 516) | public static Field parseFieldAndUnescape(String full) throws RuntimeE...
FILE: d2j-smali/src/test/java/a/BaksmaliTest.java
class BaksmaliTest (line 14) | public class BaksmaliTest {
method t (line 17) | @Test
method dotest (line 30) | private void dotest(Path f) throws Exception {
FILE: d2j-smali/src/test/java/a/SmaliTest.java
class SmaliTest (line 27) | public class SmaliTest {
method test (line 28) | @Test
method readDex (line 41) | Map<String, DexClassNode> readDex(File path) throws IOException {
method test2 (line 52) | @Test
method dotest (line 66) | private void dotest(File dexFile) throws IOException {
method toDex (line 105) | private byte[] toDex(DexClassNode dexClassNode2) {
method pbaksmali (line 112) | private static String pbaksmali(DexClassNode dcn) throws IOException {
method baksmali (line 121) | private static String baksmali(DexBackedClassDef def) throws IOExcepti...
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ET.java
type ET (line 29) | public enum ET {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/IrMethod.java
class IrMethod (line 30) | public class IrMethod {
method clone (line 47) | public IrMethod clone() {
method toString (line 75) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/LabelAndLocalMapper.java
class LabelAndLocalMapper (line 10) | public class LabelAndLocalMapper {
method map (line 14) | public LabelStmt map(LabelStmt label) {
method map (line 23) | public Local map(Local local) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/LocalVar.java
class LocalVar (line 6) | public class LocalVar {
method LocalVar (line 12) | public LocalVar(String name, String type, String signature, LabelStmt ...
method clone (line 21) | public LocalVar clone(LabelAndLocalMapper map) {
method toString (line 25) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/StmtSearcher.java
class StmtSearcher (line 7) | public class StmtSearcher {
method travel (line 8) | public void travel(StmtList stmts) {
method travel (line 14) | public void travel(Stmt stmt) {
method travel (line 34) | public void travel(Value op) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/StmtTraveler.java
class StmtTraveler (line 9) | public class StmtTraveler {
method travel (line 10) | public void travel(IrMethod method) {
method travel (line 13) | public void travel(StmtList stmts) {
method travel (line 24) | public Stmt travel(Stmt stmt) {
method travel (line 45) | public Value travel(Value op) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/TransformerException.java
class TransformerException (line 3) | public class TransformerException extends RuntimeException {
method TransformerException (line 10) | public TransformerException() {
method TransformerException (line 14) | public TransformerException(String arg0, Throwable arg1) {
method TransformerException (line 18) | public TransformerException(String arg0) {
method TransformerException (line 22) | public TransformerException(Throwable arg0) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/Trap.java
class Trap (line 26) | public class Trap {
method Trap (line 30) | public Trap() {
method Trap (line 34) | public Trap(LabelStmt start, LabelStmt end, LabelStmt handlers[], Stri...
method clone (line 42) | public Trap clone(LabelAndLocalMapper mapper) {
method toString (line 53) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/TypeClass.java
type TypeClass (line 19) | public enum TypeClass {
method TypeClass (line 39) | TypeClass(String use, boolean fixed) {
method TypeClass (line 44) | TypeClass(String use) {
method clzOf (line 49) | public static TypeClass clzOf(String desc) {
method merge (line 86) | public static TypeClass merge(TypeClass thizCls, TypeClass clz) {
method merge0 (line 124) | private static TypeClass merge0(TypeClass a, TypeClass b) {
method toString (line 174) | public String toString() {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/Util.java
class Util (line 26) | public class Util {
method listDesc (line 27) | public static List<String> listDesc(String desc) {
method appendString (line 85) | public static void appendString(final StringBuffer buf, final String s) {
method toShortClassName (line 114) | public static String toShortClassName(String desc) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/AbstractInvokeExpr.java
class AbstractInvokeExpr (line 22) | public abstract class AbstractInvokeExpr extends EnExpr {
method releaseMemory (line 23) | @Override
method getProto (line 28) | public abstract Proto getProto();
method AbstractInvokeExpr (line 30) | public AbstractInvokeExpr(VT type, Value[] args) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/ArrayExpr.java
class ArrayExpr (line 29) | public class ArrayExpr extends E2Expr {
method ArrayExpr (line 31) | public ArrayExpr() {
method ArrayExpr (line 37) | public ArrayExpr(Value base, Value index, String elementType) {
method clone (line 42) | @Override
method clone (line 47) | @Override
method toString0 (line 52) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/BinopExpr.java
class BinopExpr (line 50) | public class BinopExpr extends E2Expr {
method BinopExpr (line 53) | public BinopExpr(VT vt, Value op1, Value op2, String type) {
method releaseMemory (line 58) | @Override
method clone (line 64) | @Override
method clone (line 68) | @Override
method toString0 (line 72) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/CastExpr.java
class CastExpr (line 28) | public class CastExpr extends E1Expr {
method CastExpr (line 32) | public CastExpr(Value value, String from, String to) {
method releaseMemory (line 38) | @Override
method clone (line 44) | @Override
method clone (line 48) | @Override
method toString0 (line 52) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/Constant.java
class Constant (line 31) | public class Constant extends E0Expr {
method Constant (line 37) | public Constant(Object value) {
method clone (line 42) | @Override
method clone (line 47) | @Override
method toString0 (line 52) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/Exprs.java
class Exprs (line 24) | public final class Exprs {
method copy (line 25) | public static Value[] copy(Value[] v) {
method nByte (line 36) | public static Constant nByte(byte i) {
method nChar (line 40) | public static Constant nChar(char i) {
method nType (line 44) | public static Constant nType(String desc) {
method nType (line 47) | public static Constant nType(DexType t) {
method nDouble (line 51) | public static Constant nDouble(double i) {
method nFloat (line 55) | public static Constant nFloat(float i) {
method nInt (line 59) | public static Constant nInt(int i) {
method nLong (line 63) | public static Constant nLong(long i) {
method nNull (line 67) | public static Constant nNull() {
method nShort (line 71) | public static Constant nShort(short i) {
method nString (line 75) | public static Constant nString(String i) {
method nAdd (line 79) | public static BinopExpr nAdd(Value a, Value b, String type) {
method niAdd (line 83) | public static BinopExpr niAdd(Value a, Value b) {
method nAnd (line 87) | public static BinopExpr nAnd(Value a, Value b, String type) {
method nArray (line 91) | public static ArrayExpr nArray(Value base, Value index, String element...
method nArrayValue (line 95) | public static Constant nArrayValue(Object array) {
method nCast (line 99) | public static CastExpr nCast(Value obj, String from, String to) {
method nCheckCast (line 103) | public static TypeExpr nCheckCast(Value obj, String type) {
method nDCmpg (line 107) | public static BinopExpr nDCmpg(Value a, Value b) {
method nDCmpl (line 111) | public static BinopExpr nDCmpl(Value a, Value b) {
method nDiv (line 115) | public static BinopExpr nDiv(Value a, Value b, String type) {
method nEq (line 130) | public static BinopExpr nEq(Value a, Value b, String type) {
method niEq (line 134) | public static BinopExpr niEq(Value a, Value b) {
method nExceptionRef (line 138) | public static RefExpr nExceptionRef(String type) {
method nFCmpg (line 142) | public static BinopExpr nFCmpg(Value a, Value b) {
method nFCmpl (line 146) | public static BinopExpr nFCmpl(Value a, Value b) {
method nField (line 150) | public static FieldExpr nField(Value object, String ownerType, String ...
method nGe (line 154) | public static BinopExpr nGe(Value a, Value b, String type) {
method nGt (line 158) | public static BinopExpr nGt(Value a, Value b, String type) {
method njGt (line 162) | public static BinopExpr njGt(Value a, Value b) {
method niGt (line 166) | public static BinopExpr niGt(Value a, Value b) {
method nInstanceOf (line 170) | public static TypeExpr nInstanceOf(Value value, String type) {
method nInvokeInterface (line 174) | public static InvokeExpr nInvokeInterface(Value[] regs, String owner, ...
method nInvokeNew (line 179) | public static InvokeExpr nInvokeNew(Value[] regs, String[] argmentType...
method nInvokeSpecial (line 183) | public static InvokeExpr nInvokeSpecial(Value[] regs, String owner, St...
method nInvokeStatic (line 188) | public static InvokeExpr nInvokeStatic(Value[] regs, String owner, Str...
method nInvokeVirtual (line 193) | public static InvokeExpr nInvokeVirtual(Value[] regs, String owner, St...
method nInvokeCustom (line 198) | public static InvokeCustomExpr nInvokeCustom(Value[] regs, String name...
method nInvokePolymorphic (line 202) | public static InvokePolymorphicExpr nInvokePolymorphic(Value[] regs, P...
method nLCmp (line 206) | public static BinopExpr nLCmp(Value a, Value b) {
method nLe (line 210) | public static BinopExpr nLe(Value a, Value b, String type) {
method nLength (line 214) | public static UnopExpr nLength(Value array) {
method nLocal (line 218) | public static Local nLocal(int index) {
method nLocal (line 222) | public static Local nLocal(String debugName) {
method nLocal (line 226) | public static Local nLocal(int index, String debugName) {
method nLt (line 230) | public static BinopExpr nLt(Value a, Value b, String type) {
method nMul (line 234) | public static BinopExpr nMul(Value a, Value b, String type) {
method nNe (line 238) | public static BinopExpr nNe(Value a, Value b, String type) {
method nNeg (line 242) | public static UnopExpr nNeg(Value array, String type) {
method nNew (line 246) | public static NewExpr nNew(String type) {
method nNewArray (line 250) | public static TypeExpr nNewArray(String elementType, Value size) {
method nNewIntArray (line 254) | public static TypeExpr nNewIntArray(Value size) {
method nNewLongArray (line 258) | public static TypeExpr nNewLongArray(Value size) {
method nFilledArray (line 262) | public static FilledArrayExpr nFilledArray(String elementType, Value[]...
method nNewMutiArray (line 266) | public static NewMutiArrayExpr nNewMutiArray(String base, int dim, Val...
method nNot (line 270) | public static UnopExpr nNot(Value array, String type) {
method nOr (line 274) | public static BinopExpr nOr(Value a, Value b, String type) {
method nParameterRef (line 278) | public static RefExpr nParameterRef(String type, int index) {
method nRem (line 282) | public static BinopExpr nRem(Value a, Value b, String type) {
method nShl (line 286) | public static BinopExpr nShl(Value a, Value b, String type) {
method nShr (line 290) | public static BinopExpr nShr(Value a, Value b, String type) {
method nStaticField (line 294) | public static StaticFieldExpr nStaticField(String ownerType, String fi...
method nSub (line 298) | public static BinopExpr nSub(Value a, Value b, String type) {
method nThisRef (line 302) | public static RefExpr nThisRef(String type) {
method nUshr (line 306) | public static BinopExpr nUshr(Value a, Value b, String type) {
method nXor (line 310) | public static BinopExpr nXor(Value a, Value b, String type) {
method Exprs (line 314) | private Exprs() {
method nPhi (line 317) | public static PhiExpr nPhi(Value... ops) {
method nConstant (line 321) | public static Constant nConstant(Object cst) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/FieldExpr.java
class FieldExpr (line 29) | public class FieldExpr extends E1Expr {
method FieldExpr (line 44) | public FieldExpr(Value object, String ownerType, String fieldName, Str...
method releaseMemory (line 51) | @Override
method clone (line 58) | @Override
method clone (line 62) | @Override
method toString0 (line 67) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/FilledArrayExpr.java
class FilledArrayExpr (line 27) | public class FilledArrayExpr extends EnExpr {
method releaseMemory (line 30) | @Override
method FilledArrayExpr (line 35) | public FilledArrayExpr(Value[] datas, String type) {
method clone (line 40) | @Override
method clone (line 44) | @Override
method toString0 (line 49) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/InvokeCustomExpr.java
class InvokeCustomExpr (line 22) | public class InvokeCustomExpr extends AbstractInvokeExpr {
method releaseMemory (line 28) | @Override
method getProto (line 37) | @Override
method InvokeCustomExpr (line 42) | public InvokeCustomExpr(VT type, Value[] args, String methodName, Prot...
method clone (line 50) | @Override
method clone (line 55) | @Override
method toString0 (line 60) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/InvokeExpr.java
class InvokeExpr (line 37) | public class InvokeExpr extends AbstractInvokeExpr {
method releaseMemory (line 41) | @Override
method getProto (line 47) | @Override
method InvokeExpr (line 52) | public InvokeExpr(VT type, Value[] args, String ownerType, String meth...
method InvokeExpr (line 58) | public InvokeExpr(VT type, Value[] args, Method method) {
method clone (line 63) | @Override
method clone (line 68) | @Override
method toString0 (line 73) | @Override
method getOwner (line 100) | public String getOwner() {
method getRet (line 104) | public String getRet() {
method getName (line 108) | public String getName() {
method getArgs (line 112) | public String[] getArgs() {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/InvokePolymorphicExpr.java
class InvokePolymorphicExpr (line 23) | public class InvokePolymorphicExpr extends AbstractInvokeExpr {
method releaseMemory (line 27) | @Override
method getProto (line 34) | @Override
method InvokePolymorphicExpr (line 39) | public InvokePolymorphicExpr(VT type, Value[] args, Proto proto, Metho...
method clone (line 45) | @Override
method clone (line 50) | @Override
method toString0 (line 55) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/Local.java
class Local (line 27) | public class Local extends E0Expr {
method Local (line 32) | public Local(String debugName) {
method Local (line 37) | public Local(int index, String debugName) {
method Local (line 43) | public Local() {
method Local (line 47) | public Local(int index) {
method clone (line 52) | @Override
method clone (line 61) | @Override
method toString0 (line 66) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/NewExpr.java
class NewExpr (line 26) | public class NewExpr extends E0Expr {
method NewExpr (line 30) | public NewExpr(String type) {
method clone (line 35) | @Override
method clone (line 40) | @Override
method releaseMemory (line 45) | @Override
method toString0 (line 51) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/NewMutiArrayExpr.java
class NewMutiArrayExpr (line 29) | public class NewMutiArrayExpr extends EnExpr {
method NewMutiArrayExpr (line 44) | public NewMutiArrayExpr(String base, int dimension, Value[] sizes) {
method releaseMemory (line 50) | @Override
method clone (line 56) | @Override
method clone (line 61) | @Override
method toString0 (line 66) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/PhiExpr.java
class PhiExpr (line 22) | public class PhiExpr extends EnExpr {
method PhiExpr (line 24) | public PhiExpr(Value[] ops) {
method clone (line 28) | @Override
method clone (line 32) | @Override
method toString0 (line 36) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/RefExpr.java
class RefExpr (line 31) | public class RefExpr extends E0Expr {
method releaseMemory (line 37) | @Override
method RefExpr (line 43) | public RefExpr(VT vt, String refType, int index) {
method clone (line 49) | @Override
method clone (line 53) | @Override
method toString0 (line 58) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/StaticFieldExpr.java
class StaticFieldExpr (line 31) | public class StaticFieldExpr extends E0Expr {
method releaseMemory (line 46) | @Override
method StaticFieldExpr (line 53) | public StaticFieldExpr(String ownerType, String fieldName, String fiel...
method clone (line 60) | @Override
method clone (line 64) | @Override
method toString0 (line 69) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/TypeExpr.java
class TypeExpr (line 32) | public class TypeExpr extends E1Expr {
method releaseMemory (line 36) | @Override
method TypeExpr (line 42) | public TypeExpr(VT vt, Value value, String desc) {
method clone (line 48) | @Override
method clone (line 53) | @Override
method toString0 (line 59) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/UnopExpr.java
class UnopExpr (line 31) | public class UnopExpr extends E1Expr {
method releaseMemory (line 34) | @Override
method UnopExpr (line 45) | public UnopExpr(VT vt, Value value, String type) {
method clone (line 50) | @Override
method clone (line 54) | @Override
method toString0 (line 59) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/Value.java
class Value (line 27) | public abstract class Value implements Cloneable {
method setOp (line 28) | public void setOp(Value op) {
method setOp1 (line 31) | public void setOp1(Value op) {
method setOp2 (line 34) | public void setOp2(Value op) {
method setOps (line 37) | public void setOps(Value[] op) {
class E0Expr (line 45) | public static abstract class E0Expr extends Value {
method E0Expr (line 47) | public E0Expr(VT vt) {
class E1Expr (line 58) | public static abstract class E1Expr extends Value {
method setOp (line 62) | public void setOp(Value op) {
method E1Expr (line 71) | public E1Expr(VT vt, Value op) {
method getOp (line 76) | @Override
method releaseMemory (line 81) | @Override
class E2Expr (line 92) | public static abstract class E2Expr extends Value {
method setOp1 (line 97) | public void setOp1(Value op1) {
method setOp2 (line 101) | public void setOp2(Value op2) {
method E2Expr (line 105) | public E2Expr(VT vt, Value op1, Value op2) {
method getOp1 (line 111) | @Override
method getOp2 (line 116) | @Override
method releaseMemory (line 121) | @Override
class EnExpr (line 132) | public static abstract class EnExpr extends Value {
method setOps (line 136) | public void setOps(Value[] ops) {
method EnExpr (line 140) | public EnExpr(VT vt, Value[] ops) {
method cloneOps (line 145) | protected Value[] cloneOps() {
method cloneOps (line 152) | protected Value[] cloneOps(LabelAndLocalMapper mapper) {
method getOps (line 160) | @Override
method releaseMemory (line 165) | @Override
type VT (line 176) | public static enum VT {
method VT (line 192) | VT(int flags) {
method VT (line 196) | VT(String name, int flags) {
method toString (line 201) | @Override
method canThrow (line 206) | public boolean canThrow() {
method mayThrow (line 210) | public boolean mayThrow() {
method Value (line 236) | protected Value(VT vt, ET et) {
method clone (line 242) | @Override
method clone (line 245) | public abstract Value clone(LabelAndLocalMapper mapper);
method getOp (line 247) | public Value getOp() {
method getOp1 (line 251) | public Value getOp1() {
method getOp2 (line 255) | public Value getOp2() {
method getOps (line 259) | public Value[] getOps() {
method releaseMemory (line 266) | protected void releaseMemory() {
method toString (line 269) | public final String toString() {
method toString0 (line 273) | protected abstract String toString0();
method trim (line 275) | public Value trim() {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/AssignStmt.java
class AssignStmt (line 32) | public class AssignStmt extends E2Stmt {
method AssignStmt (line 34) | public AssignStmt(ST type, Value left, Value right) {
method clone (line 38) | @Override
method toString (line 43) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/BaseSwitchStmt.java
class BaseSwitchStmt (line 28) | public abstract class BaseSwitchStmt extends E1Stmt {
method BaseSwitchStmt (line 29) | public BaseSwitchStmt(ST type, Value op) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/GotoStmt.java
class GotoStmt (line 30) | public class GotoStmt extends E0Stmt implements JumpStmt {
method getTarget (line 33) | public LabelStmt getTarget() {
method setTarget (line 37) | public void setTarget(LabelStmt target) {
method GotoStmt (line 41) | public GotoStmt(LabelStmt target) {
method clone (line 46) | @Override
method toString (line 52) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/IfStmt.java
class IfStmt (line 30) | public class IfStmt extends E1Stmt implements JumpStmt {
method getTarget (line 34) | public LabelStmt getTarget() {
method setTarget (line 38) | public void setTarget(LabelStmt target) {
method IfStmt (line 49) | public IfStmt(ST type, Value condition, LabelStmt target) {
method clone (line 54) | @Override
method toString (line 60) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/JumpStmt.java
type JumpStmt (line 19) | public interface JumpStmt {
method getTarget (line 21) | LabelStmt getTarget();
method setTarget (line 23) | void setTarget(LabelStmt labelStmt);
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/LabelStmt.java
class LabelStmt (line 32) | public class LabelStmt extends E0Stmt {
method LabelStmt (line 39) | public LabelStmt() {
method clone (line 43) | @Override
method getDisplayName (line 55) | public String getDisplayName() {
method toString (line 63) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/LookupSwitchStmt.java
class LookupSwitchStmt (line 29) | public class LookupSwitchStmt extends BaseSwitchStmt {
method LookupSwitchStmt (line 33) | public LookupSwitchStmt(Value key, int[] lookupValues, LabelStmt[] tar...
method clone (line 40) | @Override
method toString (line 52) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/NopStmt.java
class NopStmt (line 29) | public class NopStmt extends E0Stmt {
method NopStmt (line 31) | public NopStmt() {
method clone (line 35) | @Override
method toString (line 40) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/ReturnVoidStmt.java
class ReturnVoidStmt (line 29) | public class ReturnVoidStmt extends E0Stmt {
method ReturnVoidStmt (line 31) | public ReturnVoidStmt() {
method clone (line 35) | @Override
method toString (line 40) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/Stmt.java
class Stmt (line 34) | public abstract class Stmt {
class E0Stmt (line 41) | public static abstract class E0Stmt extends Stmt {
method E0Stmt (line 43) | public E0Stmt(ST type) {
class E1Stmt (line 53) | public static abstract class E1Stmt extends Stmt {
method E1Stmt (line 57) | public E1Stmt(ST type, Value op) {
method getOp (line 62) | @Override
method setOp (line 67) | public void setOp(Value op) {
class E2Stmt (line 78) | public static abstract class E2Stmt extends Stmt {
method E2Stmt (line 83) | public E2Stmt(ST type, Value op1, Value op2) {
method getOp1 (line 89) | @Override
method getOp2 (line 94) | @Override
method setOp1 (line 99) | public void setOp1(Value op1) {
method setOp2 (line 103) | public void setOp2(Value op2) {
type ST (line 119) | public static enum ST {
method ST (line 131) | ST(int config) {
method canBranch (line 135) | public boolean canBranch() {
method canContinue (line 139) | public boolean canContinue() {
method canSwitch (line 143) | public boolean canSwitch() {
method mayThrow (line 147) | public boolean mayThrow() {
method canThrow (line 151) | public boolean canThrow() {
method Stmt (line 216) | protected Stmt(ST st, ET et) {
method clone (line 221) | public abstract Stmt clone(LabelAndLocalMapper mapper);
method getNext (line 227) | public final Stmt getNext() {
method getOp (line 231) | public Value getOp() {
method getOp1 (line 235) | public Value getOp1() {
method getOp2 (line 239) | public Value getOp2() {
method getOps (line 243) | public Value[] getOps() {
method getPre (line 251) | public final Stmt getPre() {
method setOp (line 255) | public void setOp(Value op) {
method setOp1 (line 258) | public void setOp1(Value op) {
method setOp2 (line 261) | public void setOp2(Value op) {
method setOps (line 264) | public void setOps(Value[] op) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/StmtList.java
class StmtList (line 31) | public class StmtList implements Iterable<Stmt>, java.util.Comparator<St...
class StmtListIterator (line 33) | private static class StmtListIterator implements Iterator<Stmt> {
method StmtListIterator (line 41) | public StmtListIterator(StmtList list, Stmt next) {
method hasNext (line 47) | @Override
method next (line 52) | @Override
method remove (line 63) | @Override
method add (line 77) | public void add(Stmt stmt) {
method addAll (line 81) | public void addAll(Collection<Stmt> list) {
method clone (line 87) | public StmtList clone(LabelAndLocalMapper mapper) {
method compare (line 95) | @Override
method contains (line 100) | public boolean contains(Stmt stmt) {
method getFirst (line 104) | public Stmt getFirst() {
method getLast (line 108) | public Stmt getLast() {
method getSize (line 112) | public int getSize() {
method indexIt (line 116) | private void indexIt(Stmt stmt) {
method insertAfter (line 123) | public void insertAfter(Stmt position, Stmt stmt) {
method insertBefore (line 139) | public void insertBefore(Stmt position, Stmt stmt) {
method insertFirst (line 155) | public void insertFirst(Stmt stmt) {
method insertLast (line 170) | public void insertLast(Stmt stmt) {
method iterator (line 185) | @Override
method remove (line 190) | public void remove(Stmt stmt) {
method replace (line 209) | public void replace(Stmt stmt, Stmt nas) {
method toString (line 231) | @Override
method move (line 246) | public void move(Stmt start, Stmt end, Stmt dist) {
method clear (line 269) | public void clear() {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/Stmts.java
class Stmts (line 21) | public final class Stmts {
method nAssign (line 23) | public static AssignStmt nAssign(Value left, Value right) {
method nFillArrayData (line 27) | public static AssignStmt nFillArrayData(Value left, Value arrayData) {
method nGoto (line 31) | public static GotoStmt nGoto(LabelStmt target) {
method nIdentity (line 35) | public static AssignStmt nIdentity(Value local, Value identityRef) {
method nIf (line 39) | public static IfStmt nIf(Value a, LabelStmt target) {
method nLabel (line 43) | public static LabelStmt nLabel() {
method nLock (line 47) | public static UnopStmt nLock(Value op) {
method nLookupSwitch (line 51) | public static LookupSwitchStmt nLookupSwitch(Value key, int[] lookupVa...
method nNop (line 55) | public static NopStmt nNop() {
method nReturn (line 59) | public static UnopStmt nReturn(Value op) {
method nReturnVoid (line 63) | public static ReturnVoidStmt nReturnVoid() {
method nTableSwitch (line 67) | public static TableSwitchStmt nTableSwitch(Value key, int lowIndex, La...
method nThrow (line 72) | public static UnopStmt nThrow(Value op) {
method nUnLock (line 76) | public static UnopStmt nUnLock(Value op) {
method nVoidInvoke (line 80) | public static VoidInvokeStmt nVoidInvoke(Value op) {
method Stmts (line 84) | private Stmts() {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/TableSwitchStmt.java
class TableSwitchStmt (line 29) | public class TableSwitchStmt extends BaseSwitchStmt {
method TableSwitchStmt (line 33) | public TableSwitchStmt() {
method TableSwitchStmt (line 37) | public TableSwitchStmt(Value key, int lowIndex, LabelStmt[] targets, L...
method clone (line 44) | @Override
method toString (line 53) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/UnopStmt.java
class UnopStmt (line 22) | public class UnopStmt extends E1Stmt {
method UnopStmt (line 24) | public UnopStmt(ST type, Value op) {
method clone (line 28) | @Override
method toString (line 33) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/VoidInvokeStmt.java
class VoidInvokeStmt (line 31) | public class VoidInvokeStmt extends E1Stmt {
method VoidInvokeStmt (line 33) | public VoidInvokeStmt(Value op) {
method clone (line 37) | @Override
method toString (line 42) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/AggTransformer.java
class AggTransformer (line 13) | public class AggTransformer extends StatedTransformer {
method transformReportChanged (line 14) | @Override
method localCanExecFirst (line 76) | private static void localCanExecFirst(Local local, Stmt target) throws...
method localCanExecFirst (line 117) | private static void localCanExecFirst(Local local, Value op) throws Me...
class MergeResult (line 152) | static class MergeResult extends Throwable {
class ReplaceX (line 156) | static class ReplaceX implements Cfg.TravelCallBack {
method onAssign (line 160) | @Override
method onUse (line 165) | @Override
method simpleMergeLocals (line 186) | private boolean simpleMergeLocals(IrMethod method, boolean changed, Se...
method collectLocalUsedInPhi (line 235) | private Set<Local> collectLocalUsedInPhi(IrMethod method) {
method modReplace (line 252) | private void modReplace(Map<Local, Value> toReplace, Cfg.TravelCallBac...
method isLocationInsensitive (line 273) | static boolean isLocationInsensitive(Value.VT vt) {
method isLocationInsensitive (line 310) | static boolean isLocationInsensitive(Value op) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/Cfg.java
class Cfg (line 38) | public class Cfg {
method countLocalReads (line 40) | public static int[] countLocalReads(IrMethod method) {
method reIndexLocalAndLabel (line 58) | public static void reIndexLocalAndLabel(IrMethod irMethod) {
method reIndexLabel (line 63) | private static void reIndexLabel(IrMethod irMethod) {
type FrameVisitor (line 72) | public interface FrameVisitor<T> {
method merge (line 73) | T merge(T srcFrame, T distFrame, Stmt src, Stmt dist);
method initFirstFrame (line 75) | T initFirstFrame(Stmt first);
method exec (line 77) | T exec(T frame, Stmt stmt);
method notThrow (line 81) | public static boolean notThrow(Stmt s) {
method isThrow (line 85) | public static boolean isThrow(Stmt s) {
method isThrow (line 103) | private static boolean isThrow(Value op) {
method createCfgWithoutEx (line 123) | public static void createCfgWithoutEx(IrMethod jm) {
method createCFG (line 151) | public static void createCFG(IrMethod jm) {
type DfsVisitor (line 171) | public static interface DfsVisitor {
method onVisit (line 172) | void onVisit(Stmt p);
method dfsVisit (line 175) | public static void dfsVisit(IrMethod method, DfsVisitor visitor) {
method dfs (line 212) | @SuppressWarnings("unchecked")
method link (line 284) | private static void link(Stmt from, Stmt to) {
type OnUseCallBack (line 291) | public interface OnUseCallBack {
method onUse (line 292) | Value onUse(Local v);
type OnAssignCallBack (line 295) | public interface OnAssignCallBack {
method onAssign (line 296) | Value onAssign(Local v, AssignStmt as);
type TravelCallBack (line 299) | public interface TravelCallBack extends OnUseCallBack, OnAssignCallBack {
method travelMod (line 303) | public static Value travelMod(Value value, OnUseCallBack callback) {
method travel (line 327) | public static void travel(Value value, OnUseCallBack callback) {
method travelMod (line 350) | public static void travelMod(Stmt p, TravelCallBack callback, boolean ...
method travel (line 379) | public static void travel(Stmt p, TravelCallBack callback, boolean tra...
method travel (line 408) | public static void travel(StmtList stmts, TravelCallBack callback, boo...
method travelMod (line 414) | public static void travelMod(StmtList stmts, TravelCallBack callback, ...
method reIndexLocal (line 424) | public static int reIndexLocal(IrMethod method) {
method collectTos (line 432) | public static void collectTos(Stmt stmt, Set<Stmt> tos) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/CleanLabel.java
class CleanLabel (line 35) | public class CleanLabel implements Transformer {
method transform (line 37) | @Override
method addVars (line 49) | private void addVars(List<LocalVar> vars, Set<LabelStmt> uselabels) {
method rmUnused (line 59) | private void rmUnused(StmtList stmts, Set<LabelStmt> uselabels) {
method addStmt (line 73) | private void addStmt(StmtList stmts, Set<LabelStmt> labels) {
method addTrap (line 87) | private void addTrap(List<Trap> traps, Set<LabelStmt> labels) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/ConstTransformer.java
class ConstTransformer (line 38) | @SuppressWarnings({"unchecked", "rawtypes"})
method transform (line 40) | @Override
method clean (line 59) | private void clean(IrMethod m) {
method replace (line 65) | private void replace(IrMethod m) {
method markReplacable (line 91) | private void markReplacable(IrMethod m) {
method markConstant (line 109) | private void markConstant(IrMethod m) {
method collect (line 157) | private void collect(IrMethod m) {
method init (line 189) | private void init(IrMethod m) {
class ConstAnalyzeValue (line 195) | static class ConstAnalyzeValue {
method ConstAnalyzeValue (line 204) | public ConstAnalyzeValue(Local local) {
method isZero (line 209) | public boolean isZero() {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/DeadCodeTransformer.java
class DeadCodeTransformer (line 29) | public class DeadCodeTransformer implements Transformer {
method transform (line 30) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/EndRemover.java
class EndRemover (line 23) | public class EndRemover implements Transformer {
method map (line 26) | @Override
method transform (line 32) | @Override
method move4Label (line 90) | private void move4Label(StmtList stmts, LabelStmt start, Stmt end, Lab...
method move4End (line 95) | private void move4End(StmtList stmts, LabelStmt start, Stmt end) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/ExceptionHandlerTrim.java
class ExceptionHandlerTrim (line 73) | public class ExceptionHandlerTrim implements Transformer {
method transform (line 75) | @SuppressWarnings({ "unchecked", "rawtypes" })
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/FixVar.java
class FixVar (line 59) | public class FixVar implements Transformer {
method transform (line 61) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/Ir2JRegAssignTransformer.java
class Ir2JRegAssignTransformer (line 40) | public class Ir2JRegAssignTransformer implements Transformer {
class Reg (line 42) | public static class Reg {
method compare (line 51) | @Override
method genGraph (line 61) | private Reg[] genGraph(IrMethod method, final Reg[] regs) {
method groupAndCleanUpByType (line 128) | Map<Character, List<Reg>> groupAndCleanUpByType(Reg[] regs) {
method initExcludeColor (line 155) | private void initExcludeColor(BitSet excludeColor, Reg as) {
method initSuggestColor (line 167) | private void initSuggestColor(BitSet suggestColor, Reg as) {
method transform (line 176) | @Override
method excludeParameters (line 301) | private void excludeParameters(BitSet excludeColor, Reg[] args, char t...
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/JimpleTransformer.java
class JimpleTransformer (line 41) | public class JimpleTransformer implements Transformer {
class N (line 43) | static class N {
method N (line 48) | public N(List<Stmt> tmp, List<Local> locals) {
method newAssign (line 55) | Value newAssign(Value x) {
method transform (line 65) | @Override
method convertExpr (line 79) | private Value convertExpr(Value x, boolean keep, N tmp) {
method convertStmt (line 125) | private void convertStmt(Stmt p, N tmp) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/MultiArrayTransformer.java
class MultiArrayTransformer (line 20) | public class MultiArrayTransformer extends StatedTransformer {
method transformReportChanged (line 21) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/NewTransformer.java
class NewTransformer (line 49) | public class NewTransformer implements Transformer {
method transform (line 53) | @Override
method replaceX (line 72) | void replaceX(IrMethod method) {
method replaceAST (line 94) | void replaceAST(IrMethod method) {
method replace0 (line 117) | void replace0(IrMethod method, Map<Local, TObject> init, int size) {
method makeSureUsedBeforeConstructor (line 164) | void makeSureUsedBeforeConstructor(IrMethod method, final Map<Local, T...
method findInvokeExpr (line 355) | InvokeExpr findInvokeExpr(Stmt p, InvokeExpr ie) {
class TObject (line 366) | static class TObject {
method TObject (line 372) | TObject(Local local, AssignStmt init) {
class Vx (line 378) | static class Vx {
method Vx (line 383) | public Vx(TObject obj, boolean init) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/NpeTransformer.java
class NpeTransformer (line 34) | public class NpeTransformer extends StatedTransformer {
class MustThrowException (line 35) | private static class MustThrowException extends RuntimeException {
method transformReportChanged (line 42) | @Override
method replace (line 136) | private void replace(final IrMethod m, final Stmt p) {
method isNull (line 268) | static boolean isNull(Value v) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/RemoveConstantFromSSA.java
class RemoveConstantFromSSA (line 46) | public class RemoveConstantFromSSA extends StatedTransformer {
method compare (line 49) | @Override
method transformReportChanged (line 55) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/RemoveLocalFromSSA.java
class RemoveLocalFromSSA (line 29) | public class RemoveLocalFromSSA extends StatedTransformer {
method replaceAssign (line 30) | static <T extends Value> void replaceAssign(List<AssignStmt> assignStm...
method simpleAssign (line 40) | private boolean simpleAssign(List<LabelStmt> phiLabels, List<AssignStm...
method replacePhi (line 64) | private void replacePhi(List<LabelStmt> phiLabels, Map<Local, Local> t...
class PhiObject (line 85) | static class PhiObject {
method getOrCreate (line 92) | public static PhiObject getOrCreate(Map<Local, PhiObject> map, Local l...
method linkPhiObject (line 102) | public static void linkPhiObject(PhiObject parent, PhiObject child) {
method simplePhi (line 108) | private boolean simplePhi(List<LabelStmt> phiLabels, Map<Local, Local>...
method removeLoopFromPhi (line 133) | private boolean removeLoopFromPhi(List<LabelStmt> phiLabels, Map<Local...
method collectPhiObjects (line 189) | private Map<Local, PhiObject> collectPhiObjects(List<LabelStmt> phiLab...
method fixReplace (line 209) | static <T> void fixReplace(Map<Local, T> toReplace) {
method transformReportChanged (line 234) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/SSATransformer.java
class SSATransformer (line 36) | public class SSATransformer implements Transformer {
method cleanTagsAndReIndex (line 38) | private void cleanTagsAndReIndex(IrMethod method) {
method deleteDeadCode (line 46) | private void deleteDeadCode(IrMethod method) {
method replaceLocalsWithSSA (line 55) | private void replaceLocalsWithSSA(final IrMethod method) {
method transform (line 129) | @Override
method prepare (line 146) | private boolean prepare(final IrMethod method) {
class SSAAnalyze (line 228) | static class SSAAnalyze extends BaseAnalyze<SSAValue> {
method SSAAnalyze (line 231) | public SSAAnalyze(IrMethod method) {
method afterExec (line 235) | @Override
method onUse (line 249) | @Override
method onAssign (line 257) | @Override
method analyzeValue (line 265) | @Override
method clearLsEmptyValueFromFrame (line 281) | protected void clearLsEmptyValueFromFrame() {
method init (line 295) | @Override
method initCFG (line 301) | @Override
method markUsed (line 306) | protected Set<SSAValue> markUsed() {
method merge (line 337) | @Override
method needCopyFrame (line 355) | private static boolean needCopyFrame(Stmt src) {
method newFrame (line 383) | @Override
method newValue (line 388) | @Override
method onAssignLocal (line 393) | @Override
method onUseLocal (line 401) | @Override
method relationMerge (line 407) | protected void relationMerge(SSAValue[] frame, Stmt dist, SSAValue[]...
method linkParentChildren (line 426) | private void linkParentChildren(SSAValue p, SSAValue c) {
class SSAValue (line 441) | private static class SSAValue implements AnalyzeValue {
method toRsp (line 447) | @Override
method toString (line 452) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/StatedTransformer.java
class StatedTransformer (line 5) | public abstract class StatedTransformer implements Transformer {
method transformReportChanged (line 6) | public abstract boolean transformReportChanged(IrMethod method);
method transform (line 8) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/Transformer.java
type Transformer (line 26) | public interface Transformer {
method transform (line 28) | public void transform(IrMethod method);
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/TypeTransformer.java
class TypeTransformer (line 38) | public class TypeTransformer implements Transformer {
method transform (line 42) | @Override
type Relation (line 100) | enum Relation {
method get (line 103) | @Override
method set (line 108) | @Override
method get (line 113) | @Override
method set (line 118) | @Override
method get (line 123) | @Override
method set (line 128) | @Override
method get (line 133) | @Override
method set (line 138) | @Override
method get (line 143) | @Override
method set (line 148) | @Override
method get (line 153) | @Override
method set (line 158) | @Override
method get (line 164) | abstract Set<TypeRef> get(TypeRef obj);
method set (line 166) | abstract void set(TypeRef obj, Set<TypeRef> v);
class TypeRef (line 169) | public static class TypeRef {
method merge (line 195) | public void merge(TypeRef other) {
method relationMerge (line 229) | private static void relationMerge(TypeRef a, TypeRef b, Relation r) {
method getReal (line 247) | private TypeRef getReal() {
method TypeRef (line 258) | public TypeRef(Value value) {
method toString (line 263) | @Override
method getType (line 270) | public String getType() {
method updateTypeClass (line 312) | public boolean updateTypeClass(TypeClass clz) {
method clear (line 323) | public void clear() {
method getProvideDesc (line 332) | String getProvideDesc() {
method addUses (line 336) | public boolean addUses(String ele) {
method addAllUses (line 347) | public boolean addAllUses(Set<String> uses) {
class TypeAnalyze (line 358) | private static class TypeAnalyze {
method TypeAnalyze (line 362) | public TypeAnalyze(IrMethod method) {
method analyze (line 367) | public List<TypeRef> analyze() {
method fixTypes (line 373) | private void fixTypes() {
method mergeArrayRelation (line 427) | private void mergeArrayRelation(TypeRef ref, Relation r) {
method mergeTypeToArrayGetValue (line 438) | private static void mergeTypeToArrayGetValue(String type, TypeRef ta...
method mergeTypeToSubRef (line 452) | private static void mergeTypeToSubRef(String type, TypeRef target, U...
method mergeTypeEx (line 474) | private static String mergeTypeEx(String a, String b) {
method copyTypes (line 519) | private void copyTypes(UniqueQueue<TypeRef> q, TypeRef ref) {
method isAllParentSetted (line 574) | private boolean isAllParentSetted(TypeRef ref) {
method mergeObjectType (line 585) | private static String mergeObjectType(String a, String b) {
method mergeProviderType (line 601) | private static String mergeProviderType(String a, String b) {
method buildArray (line 656) | private static String buildArray(int dim, String s) {
method countArrayDim (line 668) | private static int countArrayDim(String a) {
method mergeParentType (line 676) | private String mergeParentType(Set<TypeRef> parents) {
method e0expr (line 685) | private void e0expr(E0Expr op, boolean getValue) {
method e1expr (line 745) | private void e1expr(E1Expr e1, boolean getValue) {
method e2expr (line 808) | private void e2expr(E2Expr e2, boolean getValue) {
method linkSameAs (line 904) | private void linkSameAs(Value a, Value b) {
method enexpr (line 917) | private void enexpr(EnExpr enExpr) {
method exExpr (line 979) | private void exExpr(Value op) {
method exExpr (line 983) | private void exExpr(Value op, boolean getValue) {
method getDefTypeRef (line 1001) | private TypeRef getDefTypeRef(Value v) {
method linkGetArray (line 1014) | private void linkGetArray(Value array, Value v) {
method linkSetArray (line 1027) | private void linkSetArray(Value array, Value v) {
method linkFromTo (line 1040) | private void linkFromTo(Value from, Value to) {
method provideAs (line 1053) | private void provideAs(Value op, String type) {
method s1stmt (line 1059) | private void s1stmt(E1Stmt s) {
method s2stmt (line 1089) | private void s2stmt(E2Stmt s) {
method sxStmt (line 1101) | private void sxStmt() {
method toString (line 1129) | @Override
method useAs (line 1138) | private void useAs(Value op, String type) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/UnSSATransformer.java
class UnSSATransformer (line 52) | public class UnSSATransformer implements Transformer {
method compare (line 58) | @Override
method UnSSATransformer (line 64) | public UnSSATransformer() {
method fixPhi (line 115) | private void fixPhi(IrMethod method, Collection<LabelStmt> phiLabels) {
method insertAssignPath (line 174) | private void insertAssignPath(IrMethod method, Collection<LabelStmt> p...
method insertAssignPath (line 197) | private void insertAssignPath(StmtList stmts, Stmt from, LabelStmt lab...
method transform (line 265) | @Override
method genRegGraph (line 321) | private void genRegGraph(IrMethod method, LiveA liveA) {
class LiveA (line 386) | protected static class LiveA extends BaseAnalyze<LiveV> {
method compare (line 389) | @Override
method LiveA (line 395) | public LiveA(IrMethod method) {
method analyzeValue (line 399) | @Override
method clearUnUsedFromFrame (line 409) | protected void clearUnUsedFromFrame() {
method markUsed (line 425) | protected Set<LiveV> markUsed() {
method merge (line 466) | @SuppressWarnings({ "unchecked", "rawtypes" })
method newFrame (line 558) | @Override
method newValue (line 563) | @Override
method onAssignLocal (line 568) | @Override
method onUseLocal (line 576) | @Override
class LiveV (line 583) | private static class LiveV implements AnalyzeValue {
method toRsp (line 603) | @Override
method toString (line 608) | @Override
class RegAssign (line 617) | protected static class RegAssign {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/UniqueQueue.java
class UniqueQueue (line 8) | public class UniqueQueue<T> extends LinkedList<T> {
method UniqueQueue (line 11) | public UniqueQueue() {
method addAll (line 14) | @Override
method add (line 26) | @Override
method poll (line 34) | public T poll() {
method pop (line 40) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/VoidInvokeTransformer.java
class VoidInvokeTransformer (line 40) | public class VoidInvokeTransformer extends StatedTransformer {
method transformReportChanged (line 41) | @Override
method transform (line 73) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/ZeroTransformer.java
class ZeroTransformer (line 65) | public class ZeroTransformer extends StatedTransformer {
method transformReportChanged (line 67) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/an/AnalyzeValue.java
type AnalyzeValue (line 19) | public interface AnalyzeValue {
method toRsp (line 21) | public char toRsp();
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/an/BaseAnalyze.java
class BaseAnalyze (line 31) | @SuppressWarnings({"unchecked"})
method BaseAnalyze (line 45) | public BaseAnalyze(IrMethod method) {
method BaseAnalyze (line 49) | public BaseAnalyze(IrMethod method, boolean reindexLocal) {
method analyze (line 67) | public void analyze() {
method analyze0 (line 73) | protected void analyze0() {
method analyzeValue (line 79) | protected void analyzeValue() {
method afterExec (line 82) | protected void afterExec(T[] frame, Stmt stmt) {
method exec (line 86) | @Override
method getFromFrame (line 100) | protected T getFromFrame(int idx) {
method getFrame (line 104) | protected T[] getFrame(Stmt stmt) {
method setFrame (line 108) | protected void setFrame(Stmt stmt, T[] frame) {
method init (line 112) | protected void init() {
method initCFG (line 132) | protected void initCFG() {
method newFrame (line 136) | protected T[] newFrame() {
method initFirstFrame (line 140) | @Override
method newFrame (line 145) | protected abstract T[] newFrame(int size);
method newValue (line 147) | protected abstract T newValue();
method onAssign (line 149) | @Override
method onAssignLocal (line 159) | protected T onAssignLocal(Local local, Value value) {
method onUse (line 163) | @Override
method onUseLocal (line 170) | protected void onUseLocal(T aValue, Local local) {
method toString (line 173) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/an/SimpleLiveAnalyze.java
class SimpleLiveAnalyze (line 27) | public class SimpleLiveAnalyze extends BaseAnalyze<SimpleLiveValue> {
method markUsed (line 28) | protected Set<SimpleLiveValue> markUsed() {
method analyzeValue (line 67) | @Override
method getLocalSize (line 72) | public int getLocalSize() {
method SimpleLiveAnalyze (line 76) | public SimpleLiveAnalyze(IrMethod method, boolean reindexLocal) {
method onAssignLocal (line 80) | @Override
method onUseLocal (line 87) | @Override
method merge (line 93) | @Override
method newFrame (line 122) | @Override
method newValue (line 127) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/an/SimpleLiveValue.java
class SimpleLiveValue (line 21) | public class SimpleLiveValue implements AnalyzeValue {
method toRsp (line 27) | @Override
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/array/ArrayElementTransformer.java
class ArrayElementTransformer (line 33) | public class ArrayElementTransformer extends StatedTransformer {
method transformReportChanged (line 34) | @Override
method main (line 324) | public static void main(String... args) {
method searchForArrayObject (line 342) | private Set<Local> searchForArrayObject(IrMethod method) {
class ArrayValue (line 372) | static class ArrayValue {
type S (line 373) | enum S {
type IndexType (line 388) | enum IndexType {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/array/ArrayNullPointerTransformer.java
class ArrayNullPointerTransformer (line 59) | public class ArrayNullPointerTransformer implements Transformer {
method transform (line 61) | @Override
method replaceNPE (line 74) | private void replaceNPE(StmtList stmts, List<Local> locals, Stmt p) {
method tryAdd (line 123) | private boolean tryAdd(Value value, List<Value> values) {
method arrayNPE (line 163) | private boolean arrayNPE(Stmt p) {
method arrayNPE (line 187) | private boolean arrayNPE(Value value) {
FILE: dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/array/FillArrayTransformer.java
class FillArrayTransformer (line 80) | public class FillArrayTransformer extends StatedTransformer {
class ArrayObject (line 81) | private static class ArrayObject {
method ArrayObject (line 88) | private ArrayObject(int size, String type, AssignStmt init) {
method main (line 95) | public static void main(String... args) {
method transformReportChanged (line 113) | @Override
method replace (line 139) | private void replace(IrMethod method, Map<Local, ArrayObject> arraySiz...
method makeSureArrayUsedAfterAllElementAssigned (line 226) | private void makeSureArrayUsedAfterAllElementAssigned(IrMethod method,...
method makeSureArrayUsedAfterAllElementAssigned0 (line 265) | private void makeSureArrayUsedAfterAllElementAssigned0(IrMethod method...
method markUsed (line 443) | protected Set<ArrayObjectValue> markUsed(Collection<ArrayObjectValue> ...
method makeSureAllElementAreAssigned (line 478) | private void makeSureAllElementAreAssigned(Map<Local, ArrayObject> arr...
method searchForArrayObject (line 512) | private Map<Local, ArrayObject> searchForArrayObject(IrMethod method) {
class ArrayObjectValue (line 587) | static class ArrayObjectValue {
method ArrayObjectValue (line 595) | public ArrayObjectValue(Local local) {
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/AggTransformerTest.java
class AggTransformerTest (line 15) | public class AggTransformerTest extends BaseTransformerTest<AggTransform...
method t001 (line 16) | @Test
method t002 (line 26) | @Test
method test04 (line 42) | @Test
method test05 (line 60) | @Test
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/BaseTransformerTest.java
class BaseTransformerTest (line 16) | public abstract class BaseTransformerTest<T extends Transformer> {
method transform (line 18) | protected void transform() {
method toString (line 22) | @Override
method newLabel (line 29) | protected LabelStmt newLabel() {
method BaseTransformerTest (line 35) | public BaseTransformerTest() {
method addLocal (line 54) | public Local addLocal(String name) {
method addStmt (line 60) | public <D extends Stmt> D addStmt(D stmt) {
method attachPhi (line 65) | public AssignStmt attachPhi(LabelStmt labelStmt, AssignStmt phi) {
method initMethod (line 80) | public void initMethod(boolean isStatic, String ret, String... args) {
method reset (line 86) | @After
method setup (line 94) | @Before
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/ConstTransformerTest.java
class ConstTransformerTest (line 19) | public class ConstTransformerTest {
method test00 (line 21) | @Test
method test01 (line 37) | @Test
method test02 (line 56) | @Test
method test03 (line 78) | @Test
method test04 (line 100) | @Test
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/ConstantStringTest.java
class ConstantStringTest (line 8) | public class ConstantStringTest {
method test (line 9) | @Test
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/DeadCodeTrnasformerTest.java
class DeadCodeTrnasformerTest (line 9) | public class DeadCodeTrnasformerTest extends BaseTransformerTest<DeadCod...
method test09DeadCode (line 10) | @Test
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/JimpleTransformerTest.java
class JimpleTransformerTest (line 15) | public class JimpleTransformerTest extends BaseTransformerTest<JimpleTra...
method test00Base (line 20) | @Test
method test01HelloWord (line 35) | @Test
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/RemoveConstantFromSSATest.java
class RemoveConstantFromSSATest (line 18) | public class RemoveConstantFromSSATest extends BaseTransformerTest<Remov...
method t001 (line 19) | @Test
method t002 (line 45) | @Test
method t003 (line 55) | @Test
method t004 (line 71) | @Test
method t005PhiValueEqual (line 93) | @Test
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/RemoveLocalFromSSATest.java
class RemoveLocalFromSSATest (line 13) | public class RemoveLocalFromSSATest extends BaseTransformerTest<RemoveLo...
method t001 (line 14) | @Test
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/SSATransformerTest.java
class SSATransformerTest (line 17) | public class SSATransformerTest extends BaseTransformerTest<SSATransform...
method test00Base (line 22) | @Test
method test01HugeLocalStmt (line 41) | @Test
method test05PhiInGoto (line 58) | @Test
method test06PhiInTrap (line 78) | @Test
method transform (line 106) | public void transform(){
method test07MergeAtFirst (line 111) | @Test
method test03NotInsertPhiInLoop (line 146) | @Test
method test04NotInsertPhiLoop2 (line 165) | @Test
method test02NotInsertPhi (line 188) | @Test
method test08 (line 226) | @Test
method assertPhiStmt (line 279) | private void assertPhiStmt(LabelStmt label) {
method test11NotDeleteAssignWherePhiIsConfused (line 299) | @Test
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/StmtListTest.java
class StmtListTest (line 17) | public class StmtListTest {
method toStringTest (line 18) | @Test
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/TypeTransformerTest.java
class TypeTransformerTest (line 32) | public class TypeTransformerTest extends BaseTransformerTest<TypeTransfo...
method test00Base (line 36) | @Test
method test1Const (line 48) | @Test
method test2byte (line 59) | @Test
method test2char (line 73) | @Test
method test3 (line 88) | @Test
method test3Z (line 102) | @Test
method test2arrayF (line 117) | @Test
method testDefaultZI (line 131) | @Test
method testGithubIssue28 (line 146) | @Test
method testGithubIssue28x (line 158) | @Test
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/UnSSATransformerTransformerTest.java
class UnSSATransformerTransformerTest (line 19) | public class UnSSATransformerTransformerTest extends BaseTransformerTest...
method test00Base (line 21) | @Test
method test01SSAProblem (line 40) | @Test
method test02_3branches (line 57) | @Test
method test04OneInPhi (line 83) | @Test
method test05OneInPhiLoop (line 101) | @Test
method test06TwoJump (line 127) | @Test
method test07PhiInHandler (line 157) | @Test
FILE: dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/ZeroTransformerTest.java
class ZeroTransformerTest (line 18) | public class ZeroTransformerTest extends BaseTransformerTest<ZeroTransfo...
method t001 (line 19) | @Test
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/DexConstants.java
type DexConstants (line 24) | public abstract interface DexConstants {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/DexException.java
class DexException (line 23) | public class DexException extends RuntimeException {
method DexException (line 33) | public DexException() {
method DexException (line 39) | public DexException(String message) {
method DexException (line 46) | public DexException(Throwable cause) {
method DexException (line 54) | public DexException(String message, Throwable cause) {
method DexException (line 67) | public DexException(Throwable cause, String messageFormat, Object... a...
method DexException (line 79) | public DexException(String messageFormat, Object... args) {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/DexLabel.java
class DexLabel (line 24) | public class DexLabel {
method DexLabel (line 33) | public DexLabel(int offset) {
method DexLabel (line 38) | public DexLabel() {
method toString (line 42) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/DexType.java
class DexType (line 25) | public class DexType {
method DexType (line 26) | public DexType(String desc) {
method toString (line 35) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/Field.java
class Field (line 24) | public class Field {
method Field (line 38) | public Field(String owner, String name, String type) {
method getName (line 47) | public String getName() {
method getOwner (line 54) | public String getOwner() {
method getType (line 61) | public String getType() {
method toString (line 70) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/Method.java
class Method (line 26) | public class Method {
method getProto (line 40) | public Proto getProto() {
method Method (line 44) | public Method(String owner, String name, String[] parameterTypes, Stri...
method Method (line 49) | public Method(String owner, String name, Proto proto) {
method getDesc (line 54) | public String getDesc() {
method getName (line 61) | public String getName() {
method getOwner (line 68) | public String getOwner() {
method getParameterTypes (line 75) | public String[] getParameterTypes() {
method getReturnType (line 79) | public String getReturnType() {
method equals (line 83) | @Override
method hashCode (line 95) | @Override
method toString (line 108) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/MethodHandle.java
class MethodHandle (line 18) | public class MethodHandle {
method MethodHandle (line 33) | public MethodHandle(int type, Field field) {
method MethodHandle (line 38) | public MethodHandle(int type, Method method) {
method MethodHandle (line 43) | public MethodHandle(int type, Field field, Method method) {
method equals (line 49) | @Override
method hashCode (line 61) | @Override
method getType (line 69) | public int getType() {
method getField (line 73) | public Field getField() {
method getMethod (line 77) | public Method getMethod() {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/Proto.java
class Proto (line 20) | public class Proto {
method Proto (line 21) | public Proto(String[] parameterTypes, String returnType) {
method getParameterTypes (line 43) | public String[] getParameterTypes() {
method getReturnType (line 47) | public String getReturnType() {
method getDesc (line 51) | public String getDesc() {
method equals (line 65) | @Override
method hashCode (line 77) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/Visibility.java
type Visibility (line 22) | public enum Visibility {
method Visibility (line 29) | Visibility(int v) {
method displayName (line 33) | public String displayName() {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/DexAnnotationNode.java
class DexAnnotationNode (line 32) | public class DexAnnotationNode extends DexAnnotationVisitor {
class AV (line 33) | private abstract static class AV extends DexAnnotationVisitor {
method visit (line 36) | @Override
method visitAnnotation (line 41) | @Override
method visitArray (line 48) | @Override
method visitEnd (line 61) | @Override
method visitEnum (line 67) | @Override
class Item (line 73) | public static class Item {
method Item (line 78) | public Item(String name, Object value) {
method acceptAnnotationItem (line 85) | public static void acceptAnnotationItem(DexAnnotationVisitor dav, Stri...
method DexAnnotationNode (line 117) | public DexAnnotationNode(String type, Visibility visibility) {
method accept (line 123) | public void accept(DexAnnotationAble av) {
method visit (line 133) | @Override
method visitAnnotation (line 138) | @Override
method visitArray (line 145) | @Override
method visitEnum (line 157) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/DexClassNode.java
class DexClassNode (line 35) | public class DexClassNode extends DexClassVisitor {
method DexClassNode (line 45) | public DexClassNode(DexClassVisitor v, int access, String className, S...
method DexClassNode (line 53) | public DexClassNode(int access, String className, String superClass, S...
method accept (line 61) | public void accept(DexClassVisitor dcv) {
method accept (line 82) | public void accept(DexFileVisitor dfv) {
method visitAnnotation (line 90) | @Override
method visitField (line 100) | @Override
method visitMethod (line 110) | @Override
method visitSource (line 120) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/DexCodeNode.java
class DexCodeNode (line 29) | public class DexCodeNode extends DexCodeVisitor {
method DexCodeNode (line 36) | public DexCodeNode() {
method DexCodeNode (line 40) | public DexCodeNode(DexCodeVisitor visitor) {
method accept (line 44) | public void accept(DexCodeVisitor v) {
method accept (line 65) | public void accept(DexMethodVisitor v) {
method add (line 73) | protected void add(DexStmtNode stmt) {
method visitConstStmt (line 77) | @Override
method visitFillArrayDataStmt (line 82) | @Override
method visitFieldStmt (line 87) | @Override
method visitFilledNewArrayStmt (line 92) | @Override
method visitJumpStmt (line 97) | @Override
method visitLabel (line 102) | @Override
method visitMethodStmt (line 107) | @Override
method visitMethodStmt (line 112) | @Override
method visitMethodStmt (line 117) | @Override
method visitPackedSwitchStmt (line 122) | @Override
method visitRegister (line 127) | @Override
method visitSparseSwitchStmt (line 132) | @Override
method visitStmt0R (line 137) | @Override
method visitStmt1R (line 142) | @Override
method visitStmt2R (line 147) | @Override
method visitStmt2R1N (line 152) | @Override
method visitStmt3R (line 157) | @Override
method visitTryCatch (line 162) | @Override
method visitTypeStmt (line 170) | @Override
method visitDebug (line 175) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/DexDebugNode.java
class DexDebugNode (line 25) | public class DexDebugNode extends DexDebugVisitor {
method addDebug (line 30) | protected void addDebug(DexDebugOpNode dexDebugNode) {
method visitSetFile (line 34) | @Override
method visitRestartLocal (line 39) | @Override
method visitParameterName (line 44) | @Override
method visitLineNumber (line 55) | @Override
method visitStartLocal (line 60) | @Override
method visitEndLocal (line 65) | @Override
method accept (line 70) | public void accept(DexDebugVisitor v) {
method visitPrologue (line 89) | @Override
method visitEpiogue (line 94) | @Override
class DexDebugOpNode (line 99) | public abstract static class DexDebugOpNode {
method DexDebugOpNode (line 102) | protected DexDebugOpNode(DexLabel label) {
method accept (line 106) | public abstract void accept(DexDebugVisitor cv);
class StartLocalNode (line 108) | public static class StartLocalNode extends DexDebugOpNode {
method StartLocalNode (line 114) | public StartLocalNode(DexLabel label, int reg, String name, String...
method accept (line 122) | @Override
class EndLocal (line 128) | public static class EndLocal extends DexDebugOpNode {
method EndLocal (line 131) | public EndLocal(DexLabel label, int reg) {
method accept (line 136) | @Override
class Epiogue (line 142) | public static class Epiogue extends DexDebugOpNode {
method Epiogue (line 144) | public Epiogue(DexLabel label) {
method accept (line 148) | @Override
class Prologue (line 154) | public static class Prologue extends DexDebugOpNode {
method Prologue (line 156) | public Prologue(DexLabel label) {
method accept (line 160) | @Override
class RestartLocal (line 166) | public static class RestartLocal extends DexDebugOpNode {
method RestartLocal (line 169) | public RestartLocal(DexLabel label, int reg) {
method accept (line 174) | @Override
class LineNumber (line 180) | public static class LineNumber extends DexDebugOpNode {
method LineNumber (line 183) | public LineNumber(DexLabel label, int line) {
method accept (line 188) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/DexFieldNode.java
class DexFieldNode (line 32) | public class DexFieldNode extends DexFieldVisitor {
method DexFieldNode (line 38) | public DexFieldNode(DexFieldVisitor visitor, int access, Field field, ...
method DexFieldNode (line 45) | public DexFieldNode(int access, Field field, Object cst) {
method accept (line 52) | public void accept(DexClassVisitor dcv) {
method accept (line 60) | public void accept(DexFieldVisitor fv) {
method visitAnnotation (line 68) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/DexFileNode.java
class DexFileNode (line 26) | public class DexFileNode extends DexFileVisitor {
method visitDexFileVersion (line 30) | @Override
method visit (line 36) | @Override
method accept (line 43) | public void accept(DexClassVisitor dcv) {
method accept (line 49) | public void accept(DexFileVisitor dfv) {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/DexMethodNode.java
class DexMethodNode (line 30) | public class DexMethodNode extends DexMethodVisitor {
method DexMethodNode (line 37) | public DexMethodNode(DexMethodVisitor mv, int access, Method method) {
method DexMethodNode (line 43) | public DexMethodNode(int access, Method method) {
method accept (line 49) | public void accept(DexClassVisitor dcv) {
method accept (line 58) | public void accept(DexMethodVisitor mv) {
method visitAnnotation (line 83) | @Override
method visitCode (line 93) | @Override
method visitParameterAnnotation (line 100) | @SuppressWarnings("unchecked")
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/TryCatchNode.java
class TryCatchNode (line 6) | public class TryCatchNode {
method TryCatchNode (line 13) | public TryCatchNode(DexLabel start, DexLabel end, DexLabel[] handler, ...
method accept (line 20) | public void accept(DexCodeVisitor cv) {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/analysis/DvmFrame.java
class DvmFrame (line 11) | public class DvmFrame<V> {
method DvmFrame (line 15) | public DvmFrame(int totalRegister) {
method setReg (line 20) | public void setReg(int i, V v) {
method init (line 27) | public DvmFrame<V> init(DvmFrame<? extends V> src) {
method execute (line 33) | public void execute(DexStmtNode insn, DvmInterpreter<V> interpreter) {
method getTmp (line 385) | public V getTmp() {
method setTmp (line 389) | public void setTmp(V v) {
method getReg (line 393) | public V getReg(int b) {
method getTotalRegisters (line 400) | public int getTotalRegisters() {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/analysis/DvmInterpreter.java
class DvmInterpreter (line 7) | public abstract class DvmInterpreter<V> {
method newOperation (line 16) | public abstract V newOperation(DexStmtNode insn) ;
method copyOperation (line 21) | public abstract V copyOperation(DexStmtNode insn, V value) ;
method unaryOperation (line 35) | public abstract V unaryOperation(DexStmtNode insn, V value);
method binaryOperation (line 42) | public abstract V binaryOperation(DexStmtNode insn, V value1, V value2);
method ternaryOperation (line 47) | public abstract V ternaryOperation(DexStmtNode insn, V value1,
method naryOperation (line 55) | public abstract V naryOperation(DexStmtNode insn,
method returnOperation (line 61) | public abstract void returnOperation(DexStmtNode insn, V value);
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/AbstractMethodStmtNode.java
class AbstractMethodStmtNode (line 21) | public abstract class AbstractMethodStmtNode extends DexStmtNode {
method AbstractMethodStmtNode (line 24) | public AbstractMethodStmtNode(Op op, int[] args) {
method getProto (line 29) | public abstract Proto getProto();
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/BaseSwitchStmtNode.java
class BaseSwitchStmtNode (line 6) | public abstract class BaseSwitchStmtNode extends DexStmtNode {
method BaseSwitchStmtNode (line 11) | protected BaseSwitchStmtNode(Op op, int a, DexLabel[] labels) {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/ConstStmtNode.java
class ConstStmtNode (line 7) | public class ConstStmtNode extends DexStmtNode {
method ConstStmtNode (line 11) | public ConstStmtNode(Op op, int a, Object value) {
method accept (line 17) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/DexLabelStmtNode.java
class DexLabelStmtNode (line 6) | public class DexLabelStmtNode extends DexStmtNode {
method DexLabelStmtNode (line 9) | public DexLabelStmtNode(DexLabel label) {
method accept (line 14) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/DexStmtNode.java
class DexStmtNode (line 7) | public abstract class DexStmtNode {
method DexStmtNode (line 12) | protected DexStmtNode(Op op) {
method accept (line 16) | public abstract void accept(DexCodeVisitor cv);
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/FieldStmtNode.java
class FieldStmtNode (line 7) | public class FieldStmtNode extends DexStmtNode {
method FieldStmtNode (line 13) | public FieldStmtNode(Op op, int a, int b, Field field) {
method accept (line 20) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/FillArrayDataStmtNode.java
class FillArrayDataStmtNode (line 6) | public class FillArrayDataStmtNode extends DexStmtNode {
method FillArrayDataStmtNode (line 11) | public FillArrayDataStmtNode(Op op, int ra, Object array) {
method accept (line 17) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/FilledNewArrayStmtNode.java
class FilledNewArrayStmtNode (line 6) | public class FilledNewArrayStmtNode extends DexStmtNode {
method FilledNewArrayStmtNode (line 11) | public FilledNewArrayStmtNode(Op op, int[] args, String type) {
method accept (line 17) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/JumpStmtNode.java
class JumpStmtNode (line 7) | public class JumpStmtNode extends DexStmtNode {
method JumpStmtNode (line 12) | public JumpStmtNode(Op op, int a, int b, DexLabel label) {
method accept (line 19) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/MethodCustomStmtNode.java
class MethodCustomStmtNode (line 23) | public class MethodCustomStmtNode extends AbstractMethodStmtNode {
method MethodCustomStmtNode (line 29) | public MethodCustomStmtNode(Op op, int[] args, String name, Proto prot...
method accept (line 37) | @Override
method getProto (line 42) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/MethodPolymorphicStmtNode.java
class MethodPolymorphicStmtNode (line 23) | public class MethodPolymorphicStmtNode extends AbstractMethodStmtNode {
method MethodPolymorphicStmtNode (line 27) | public MethodPolymorphicStmtNode(Op op, int[] args, Method method, Pro...
method accept (line 33) | @Override
method getProto (line 38) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/MethodStmtNode.java
class MethodStmtNode (line 23) | public class MethodStmtNode extends AbstractMethodStmtNode {
method MethodStmtNode (line 26) | public MethodStmtNode(Op op, int[] args, Method method) {
method accept (line 31) | @Override
method getProto (line 36) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/PackedSwitchStmtNode.java
class PackedSwitchStmtNode (line 7) | public class PackedSwitchStmtNode extends BaseSwitchStmtNode {
method PackedSwitchStmtNode (line 11) | public PackedSwitchStmtNode(Op op, int a, int first_case, DexLabel[] l...
method accept (line 16) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/SparseSwitchStmtNode.java
class SparseSwitchStmtNode (line 7) | public class SparseSwitchStmtNode extends BaseSwitchStmtNode {
method SparseSwitchStmtNode (line 11) | public SparseSwitchStmtNode(Op op, int a, int[] cases, DexLabel[] labe...
method accept (line 16) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/Stmt0RNode.java
class Stmt0RNode (line 6) | public class Stmt0RNode extends DexStmtNode {
method Stmt0RNode (line 7) | public Stmt0RNode(Op op) {
method accept (line 10) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/Stmt1RNode.java
class Stmt1RNode (line 6) | public class Stmt1RNode extends DexStmtNode {
method Stmt1RNode (line 10) | public Stmt1RNode(Op op, int a) {
method accept (line 15) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/Stmt2R1NNode.java
class Stmt2R1NNode (line 6) | public class Stmt2R1NNode extends DexStmtNode {
method Stmt2R1NNode (line 12) | public Stmt2R1NNode(Op op, int distReg, int srcReg, int content) {
method accept (line 19) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/Stmt2RNode.java
class Stmt2RNode (line 6) | public class Stmt2RNode extends DexStmtNode {
method Stmt2RNode (line 10) | public Stmt2RNode(Op op, int a, int b) {
method accept (line 16) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/Stmt3RNode.java
class Stmt3RNode (line 6) | public class Stmt3RNode extends DexStmtNode {
method Stmt3RNode (line 11) | public Stmt3RNode(Op op, int a, int b, int c) {
method accept (line 18) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/TypeStmtNode.java
class TypeStmtNode (line 6) | public class TypeStmtNode extends DexStmtNode {
method TypeStmtNode (line 12) | public TypeStmtNode(Op op, int a, int b, String type) {
method accept (line 19) | @Override
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/reader/CFG.java
type CFG (line 3) | public interface CFG {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/reader/InstructionFormat.java
type InstructionFormat (line 3) | public enum InstructionFormat {
method InstructionFormat (line 41) | InstructionFormat(int size) {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/reader/InstructionIndexType.java
type InstructionIndexType (line 3) | enum InstructionIndexType {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/reader/Op.java
type Op (line 6) | public enum Op implements CFG {
method canBranch (line 275) | public boolean canBranch() {
method canContinue (line 279) | public boolean canContinue() {
method canReturn (line 283) | public boolean canReturn() {
method canSwitch (line 287) | public boolean canSwitch() {
method canThrow (line 291) | public boolean canThrow() {
method Op (line 295) | Op(int op, String displayName, InstructionFormat fmt, InstructionIndex...
method toString (line 303) | public String toString() {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/visitors/DexAnnotationAble.java
type DexAnnotationAble (line 26) | public interface DexAnnotationAble {
method visitAnnotation (line 37) | DexAnnotationVisitor visitAnnotation(String name, Visibility visibility);
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/visitors/DexAnnotationVisitor.java
class DexAnnotationVisitor (line 41) | public class DexAnnotationVisitor {
method DexAnnotationVisitor (line 44) | public DexAnnotationVisitor() {
method DexAnnotationVisitor (line 48) | public DexAnnotationVisitor(DexAnnotationVisitor visitor) {
method visit (line 62) | public void visit(String name, Object value) {
method visitEnum (line 78) | public void visitEnum(String name, String desc, String value) {
method visitAnnotation (line 95) | public DexAnnotationVisitor visitAnnotation(String name, String desc) {
method visitArray (line 102) | public DexAnnotationVisitor visitArray(String name) {
method visitEnd (line 112) | public void visitEnd() {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/visitors/DexClassVisitor.java
class DexClassVisitor (line 25) | public class DexClassVisitor implements DexAnnotationAble {
method DexClassVisitor (line 28) | public DexClassVisitor() {
method DexClassVisitor (line 35) | public DexClassVisitor(DexClassVisitor dcv) {
method visitAnnotation (line 40) | public DexAnnotationVisitor visitAnnotation(String name, Visibility vi...
method visitEnd (line 47) | public void visitEnd() {
method visitField (line 54) | public DexFieldVisitor visitField(int accessFlags, Field field, Object...
method visitMethod (line 61) | public DexMethodVisitor visitMethod(int accessFlags, Method method) {
method visitSource (line 68) | public void visitSource(String file) {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/visitors/DexCodeVisitor.java
class DexCodeVisitor (line 25) | public class DexCodeVisitor {
method DexCodeVisitor (line 28) | public DexCodeVisitor() {
method DexCodeVisitor (line 32) | public DexCodeVisitor(DexCodeVisitor visitor) {
method visitRegister (line 37) | public void visitRegister(int total) {
method visitStmt2R1N (line 53) | public void visitStmt2R1N(Op op, int distReg, int srcReg, int content) {
method visitStmt3R (line 81) | public void visitStmt3R(Op op, int a, int b, int c) {
method visitTypeStmt (line 100) | public void visitTypeStmt(Op op, int a, int b, String type) {
method visitConstStmt (line 116) | public void visitConstStmt(Op op, int ra, Object value) {
method visitFillArrayDataStmt (line 122) | public void visitFillArrayDataStmt(Op op, int ra, Object array) {
method visitEnd (line 128) | public void visitEnd() {
method visitFieldStmt (line 147) | public void visitFieldStmt(Op op, int a, int b, Field field) {
method visitFilledNewArrayStmt (line 162) | public void visitFilledNewArrayStmt(Op op, int[] args, String type) {
method visitJumpStmt (line 190) | public void visitJumpStmt(Op op, int a, int b, DexLabel label) {
method visitLabel (line 196) | public void visitLabel(DexLabel label) {
method visitSparseSwitchStmt (line 202) | public void visitSparseSwitchStmt(Op op, int ra, int[] cases, DexLabel...
method visitMethodStmt (line 221) | public void visitMethodStmt(Op op, int[] args, Method method) {
method visitMethodStmt (line 232) | public void visitMethodStmt(Op op, int[] args, String name, Proto prot...
method visitMethodStmt (line 244) | public void visitMethodStmt(Op op, int[] args, Method bsm, Proto proto) {
method visitStmt2R (line 263) | public void visitStmt2R(Op op, int a, int b) {
method visitStmt0R (line 275) | public void visitStmt0R(Op op) {
method visitStmt1R (line 294) | public void visitStmt1R(Op op, int reg) {
method visitPackedSwitchStmt (line 300) | public void visitPackedSwitchStmt(Op op, int aA, int first_case, DexLa...
method visitTryCatch (line 306) | public void visitTryCatch(DexLabel start, DexLabel end, DexLabel handl...
method visitDebug (line 312) | public DexDebugVisitor visitDebug() {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/visitors/DexDebugVisitor.java
class DexDebugVisitor (line 21) | public class DexDebugVisitor {
method DexDebugVisitor (line 24) | public DexDebugVisitor() {
method DexDebugVisitor (line 27) | public DexDebugVisitor(DexDebugVisitor visitor) {
method visitParameterName (line 37) | public void visitParameterName(int parameterIndex, String name) {
method visitStartLocal (line 43) | public void visitStartLocal(int reg, DexLabel label, String name, Stri...
method visitLineNumber (line 49) | public void visitLineNumber(int line, DexLabel label) {
method visitEndLocal (line 55) | public void visitEndLocal(int reg, DexLabel label) {
method visitSetFile (line 61) | public void visitSetFile(String file) {
method visitPrologue (line 67) | public void visitPrologue(DexLabel dexLabel) {
method visitEpiogue (line 73) | public void visitEpiogue(DexLabel dexLabel) {
method visitRestartLocal (line 79) | public void visitRestartLocal(int reg, DexLabel label) {
method visitEnd (line 85) | public void visitEnd() {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/visitors/DexFieldVisitor.java
class DexFieldVisitor (line 25) | public class DexFieldVisitor implements DexAnnotationAble {
method DexFieldVisitor (line 28) | public DexFieldVisitor(DexFieldVisitor visitor) {
method DexFieldVisitor (line 33) | public DexFieldVisitor() {
method visitEnd (line 36) | public void visitEnd() {
method visitAnnotation (line 43) | public DexAnnotationVisitor visitAnnotation(String name, Visibility vi...
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/visitors/DexFileVisitor.java
class DexFileVisitor (line 22) | public class DexFileVisitor {
method DexFileVisitor (line 25) | public DexFileVisitor() {
method DexFileVisitor (line 29) | public DexFileVisitor(DexFileVisitor visitor) {
method visitDexFileVersion (line 34) | public void visitDexFileVersion(int version) {
method visit (line 40) | public DexClassVisitor visit(int access_flags, String className, Strin...
method visitEnd (line 47) | public void visitEnd() {
FILE: dex-reader-api/src/main/java/com/googlecode/d2j/visitors/DexMethodVisitor.java
class DexMethodVisitor (line 24) | public class DexMethodVisitor implements DexAnnotationAble {
method DexMethodVisitor (line 27) | public DexMethodVisitor() {
method DexMethodVisitor (line 34) | public DexMethodVisitor(DexMethodVisitor mv) {
method visitAnnotation (line 39) | public DexAnnotationVisitor visitAnnotation(String name, Visibility vi...
method visitCode (line 46) | public DexCodeVisitor visitCode() {
method visitEnd (line 53) | public void visitEnd() {
method visitParameterAnnotation (line 60) | public DexAnnotationAble visitParameterAnnotation(int index) {
FILE: dex-reader/src/main/java/com/googlecode/d2j/reader/BaseDexFileReader.java
type BaseDexFileReader (line 7) | public interface BaseDexFileReader {
method getDexVersion (line 9) | int getDexVersion();
method accept (line 11) | void accept(DexFileVisitor dv);
method getClassNames (line 13) | List<String> getClassNames();
method accept (line 15) | void accept(DexFileVisitor dv, int config);
method accept (line 17) | void accept(DexFileVisitor dv, int classIdx, int config);
FILE: dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java
class DexFileReader (line 44) | public class DexFileReader implements BaseDexFileReader {
method DexFileReader (line 151) | public DexFileReader(ByteBuffer in) {
method DexFileReader (line 261) | public DexFileReader(byte[] data) {
method DexFileReader (line 271) | public DexFileReader(File file) throws IOException {
method DexFileReader (line 275) | public DexFileReader(Path file) throws IOException {
method DexFileReader (line 279) | public DexFileReader(InputStream is) throws IOException {
method readStringIndex (line 289) | private static int readStringIndex(ByteBuffer bs) {
method toByteArray (line 294) | private static byte[] toByteArray(InputStream is) throws IOException {
method slice (line 303) | private static ByteBuffer slice(ByteBuffer in, int offset, int length) {
method skip (line 311) | private static void skip(ByteBuffer in, int bytes) {
method niceExceptionMessage (line 315) | public static void niceExceptionMessage(Throwable t, int deep) {
method readIntBits (line 335) | private static long readIntBits(ByteBuffer in, int before) {
method readUIntBits (line 345) | private static long readUIntBits(ByteBuffer in, int before) {
method readFloatBits (line 354) | private static long readFloatBits(ByteBuffer in, int before) {
method sshort (line 364) | static int sshort(byte[] data, int offset) {
method ushort (line 368) | static int ushort(byte[] data, int offset) {
method sint (line 372) | static int sint(byte[] data, int offset) {
method uint (line 377) | static int uint(byte[] data, int offset) {
method WARN (line 381) | static void WARN(String fmt, Object... args) {
method ubyte (line 385) | static int ubyte(byte[] insns, int offset) {
method sbyte (line 389) | static int sbyte(byte[] insns, int offset) {
method order (line 393) | private static void order(Map<Integer, DexLabel> labelsMap, int offset) {
method readULeb128i (line 399) | public static int readULeb128i(ByteBuffer in) {
method readLeb128i (line 412) | public static int readLeb128i(ByteBuffer in) {
method DEBUG_DEBUG (line 429) | private static void DEBUG_DEBUG(String fmt, Object... args) {
method read_debug_info (line 433) | private void read_debug_info(int offset, int regSize, boolean isStatic...
method getDexVersion (line 585) | @Override
method accept (line 595) | @Override
method getClassNames (line 600) | @Override
method accept (line 621) | @Override
method accept (line 642) | @Override
method ignoreClass (line 675) | public Boolean ignoreClass(String className){
method readEncodedValue (line 679) | private Object readEncodedValue(ByteBuffer in) {
method getMethodHandle (line 743) | private MethodHandle getMethodHandle(int i) {
method acceptClass (line 767) | private void acceptClass(DexClassVisitor dcv, int source_file_idx, int...
method read_encoded_array_item (line 871) | private Object[] read_encoded_array_item(int static_values_off) {
method read_encoded_array (line 876) | private Object[] read_encoded_array(ByteBuffer in) {
method read_annotation_set_item (line 885) | private void read_annotation_set_item(int offset, DexAnnotationAble da...
method read_annotation_item (line 895) | private void read_annotation_item(int annotation_off, DexAnnotationAbl...
method read_encoded_annotation (line 904) | private DexAnnotationNode read_encoded_annotation(ByteBuffer in) {
method getField (line 918) | private Field getField(int id) {
method getTypeList (line 926) | private String[] getTypeList(int offset) {
method getProto (line 939) | private Proto getProto(int proto_idx) {
method getMethod (line 954) | private Method getMethod(int id) {
method getString (line 962) | private String getString(int id) {
method getType (line 977) | private String getType(int id) {
method acceptField (line 984) | private int acceptField(ByteBuffer in, int lastIndex, DexClassVisitor ...
method acceptMethod (line 1009) | private int acceptMethod(ByteBuffer in, int lastIndex, DexClassVisitor...
method read_annotation_set_ref_list (line 1082) | private void read_annotation_set_ref_list(int parameter_annotation_off...
method getClassSize (line 1108) | public final int getClassSize() {
class BadOpException (line 1112) | static class BadOpException extends RuntimeException{
method BadOpException (line 1113) | public BadOpException(String fmt,Object ...args){
method findLabels (line 1118) | private void findLabels(byte[] insns, BitSet nextBit, BitSet badOps, M...
method travelInsn (line 1143) | private void travelInsn(Map<Integer, DexLabel> labelsMap, Queue<Intege...
method findTryCatch (line 1332) | private void findTryCatch(ByteBuffer in, DexCodeVisitor dcv, int tries...
method acceptCode (line 1377) | void acceptCode(int code_off, DexCodeVisitor dcv, int config, boolean ...
method acceptInsn (line 1418) | private void acceptInsn(byte[] insns, DexCodeVisitor dcv, BitSet nextI...
method getCallSite (line 1782) | private Object[] getCallSite(int b) {
class LocalEntry (line 1792) | static private class LocalEntry {
method LocalEntry (line 1795) | private LocalEntry(String name, String type) {
method LocalEntry (line 1800) | private LocalEntry(String name, String type, String signature) {
FILE: dex-reader/src/main/java/com/googlecode/d2j/reader/MultiDexFileReader.java
class MultiDexFileReader (line 14) | public class MultiDexFileReader implements BaseDexFileReader {
method MultiDexFileReader (line 18) | public MultiDexFileReader(Collection<DexFileReader> readers) {
method toByteArray (line 23) | private static byte[] toByteArray(InputStream is) throws IOException {
method open (line 32) | public static BaseDexFileReader open(byte[] data) throws IOException {
method init (line 61) | void init() {
method getDexVersion (line 74) | @Override
method accept (line 86) | @Override
method getClassNames (line 91) | @Override
method accept (line 106) | @Override
method accept (line 114) | @Override
class Item (line 120) | static class Item {
method Item (line 125) | public Item(int i, DexFileReader reader, String className) {
FILE: dex-reader/src/main/java/com/googlecode/d2j/reader/zip/ZipUtil.java
class ZipUtil (line 35) | public class ZipUtil {
method toByteArray (line 36) | public static byte[] toByteArray(InputStream is) throws IOException {
method readDex (line 53) | public static byte[] readDex(File file) throws IOException {
method readDex (line 57) | public static byte[] readDex(Path file) throws IOException {
method readDex (line 61) | public static byte[] readDex(InputStream in) throws IOException {
method readDex (line 73) | public static byte[] readDex(byte[] data) throws IOException {
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/ASMifierAnnotationV.java
class ASMifierAnnotationV (line 26) | public class ASMifierAnnotationV extends DexAnnotationVisitor implements...
method ASMifierAnnotationV (line 30) | public ASMifierAnnotationV(String objName, ArrayOut out, String name, ...
method visit (line 41) | @Override
method visitEnum (line 46) | @Override
method visitAnnotation (line 51) | @Override
method visitArray (line 63) | @Override
method visitEnd (line 75) | @Override
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/ASMifierClassV.java
class ASMifierClassV (line 35) | public class ASMifierClassV extends DexClassVisitor {
method ASMifierClassV (line 43) | public ASMifierClassV(String pkgName, String javaClassName, int access...
method visitAnnotation (line 69) | @Override
method visitSource (line 74) | @Override
method visitField (line 79) | @Override
method visitMethod (line 110) | @Override
method visitEnd (line 171) | @Override
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/ASMifierCodeV.java
class ASMifierCodeV (line 30) | public class ASMifierCodeV extends DexCodeVisitor implements DexConstants {
method ASMifierCodeV (line 34) | public ASMifierCodeV(Out m) {
method visitStmt2R1N (line 38) | @Override
method visitRegister (line 43) | @Override
method visitStmt3R (line 49) | @Override
method visitStmt2R (line 55) | @Override
method visitStmt0R (line 61) | @Override
method visitStmt1R (line 67) | @Override
method visitTypeStmt (line 73) | @Override
method visitConstStmt (line 78) | @Override
method visitFieldStmt (line 92) | @Override
method visitFilledNewArrayStmt (line 97) | @Override
method v (line 104) | public String v(DexLabel[] labels) {
method v (line 118) | private Object v(DexLabel l) {
method op (line 128) | String op(Op op) {
method visitJumpStmt (line 132) | @Override
method visitMethodStmt (line 137) | @Override
method visitMethodStmt (line 142) | @Override
method visitMethodStmt (line 147) | @Override
method visitSparseSwitchStmt (line 152) | @Override
method visitPackedSwitchStmt (line 157) | @Override
method visitTryCatch (line 162) | @Override
method visitEnd (line 167) | @Override
method visitLabel (line 172) | @Override
method visitFillArrayDataStmt (line 177) | @Override
method visitDebug (line 183) | @Override
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/ASMifierFileV.java
class ASMifierFileV (line 36) | public class ASMifierFileV extends DexFileVisitor {
method doData (line 43) | public static void doData(byte[] data, Path destdir) throws IOException {
method doFile (line 47) | public static void doFile(Path srcDex) throws IOException {
method doFile (line 52) | public static void doFile(Path srcDex, Path dest) throws IOException {
method main (line 56) | public static void main(String... args) throws IOException {
method ASMifierFileV (line 67) | public ASMifierFileV(Path dir, String pkgName) {
method write (line 87) | static void write(ArrayOut out, Path file) {
method visit (line 110) | @Override
method visitEnd (line 126) | @Override
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/ArrayOut.java
class ArrayOut (line 25) | public class ArrayOut implements Out {
method push (line 32) | @Override
method s (line 37) | @Override
method s (line 43) | @Override
method pop (line 48) | @Override
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/Escape.java
class Escape (line 24) | public class Escape implements DexConstants {
method contain (line 26) | static boolean contain(int a, int b) {
method classAcc (line 30) | public static String classAcc(int acc) {
method methodAcc (line 71) | public static String methodAcc(int acc) {
method fieldAcc (line 118) | public static String fieldAcc(int acc) {
method v (line 157) | public static String v(Field f) {
method v (line 161) | public static String v(Method m) {
method v (line 165) | public static String v(Proto m) {
method v (line 169) | public static String v(MethodHandle m) {
method v (line 195) | public static String v(String s) {
method v (line 202) | public static String v(DexType t) {
method v (line 207) | public static String v(int[] vs) {
method v (line 221) | public static String v(byte[] vs) {
method v (line 235) | public static String v(String[] vs) {
method v (line 252) | public static String v(Object[] vs) {
method v (line 266) | public static String v(Object obj) {
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/Mutf8.java
class Mutf8 (line 28) | public final class Mutf8 {
method Mutf8 (line 29) | private Mutf8() {
method decode (line 36) | public static String decode(ByteBuffer in, StringBuilder sb) throws UT...
method countBytes (line 67) | private static long countBytes(String s, boolean shortLength) throws U...
method encode (line 89) | public static void encode(byte[] dst, int offset, String s) {
method encode (line 109) | public static byte[] encode(String s) throws UTFDataFormatException {
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/Out.java
type Out (line 3) | public interface Out {
method push (line 4) | void push();
method s (line 6) | void s(String s);
method s (line 8) | void s(String format, Object... arg);
method pop (line 10) | void pop();
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/Utf8Utils.java
class Utf8Utils (line 33) | public final class Utf8Utils {
method stringToUtf8Bytes (line 43) | public static byte[] stringToUtf8Bytes(String string) {
method utf8BytesToString (line 85) | public static String utf8BytesToString(byte[] bytes, int start, int le...
method throwBadUtf8 (line 184) | private static String throwBadUtf8(int value, int offset) {
method writeEscapedChar (line 189) | public static void writeEscapedChar(Writer writer, char c) throws IOEx...
method writeEscapedString (line 218) | public static void writeEscapedString(Writer writer, String value) thr...
method escapeString (line 250) | public static String escapeString(String value) {
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/zip/AccessBufByteArrayOutputStream.java
class AccessBufByteArrayOutputStream (line 5) | public class AccessBufByteArrayOutputStream extends ByteArrayOutputStream {
method getBuf (line 6) | public byte[] getBuf() {
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/zip/AutoSTOREDZipOutputStream.java
class AutoSTOREDZipOutputStream (line 27) | public class AutoSTOREDZipOutputStream extends ZipOutputStream {
method AutoSTOREDZipOutputStream (line 28) | public AutoSTOREDZipOutputStream(OutputStream out) {
method putNextEntry (line 36) | @Override
method closeEntry (line 48) | @Override
method write (line 68) | @Override
method write (line 77) | @Override
method write (line 86) | @Override
method close (line 95) | @Override
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/zip/ZipConstants.java
type ZipConstants (line 23) | interface ZipConstants {
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/zip/ZipEntry.java
class ZipEntry (line 33) | public final class ZipEntry implements ZipConstants, Cloneable {
method getComment (line 65) | public String getComment() {
method getCompressedSize (line 74) | public long getCompressedSize() {
method getCrc (line 83) | public long getCrc() {
method getExtra (line 92) | public byte[] getExtra() {
method getMethod (line 102) | public int getMethod() {
method getName (line 111) | public String getName() {
method getSize (line 120) | public long getSize() {
method getTime (line 129) | public long getTime() {
method isDirectory (line 145) | public boolean isDirectory() {
method toString (line 154) | @Override
method clone (line 162) | @Override
method ZipEntry (line 173) | ZipEntry(ByteBuffer it0, boolean skipCommentsAndExtra) throws IOExcept...
method containsNulByte (line 230) | private static boolean containsNulByte(byte[] bytes) {
FILE: dex-reader/src/main/java/com/googlecode/d2j/util/zip/ZipFile.java
class ZipFile (line 40) | public class ZipFile implements AutoCloseable, ZipConstants {
method ZipFile (line 73) | public ZipFile(ByteBuffer in) throws IOException {
method ZipFile (line 78) | public ZipFile(File fd) throws IOException {
method ZipFile (line 85) | public ZipFile(byte[] data) throws IOException {
method entries (line 89) | public List<? extends ZipEntry> entries() {
method getComment (line 101) | public String getComment() {
method findFirstEntry (line 105) | public ZipEntry findFirstEntry(String entryName) {
method findFirstEntry0 (line 117) | private ZipEntry findFirstEntry0(String entryName) {
method getEntryDataStart (line 126) | public long getEntryDataStart(ZipEntry entry) {
method getInputStream (line 143) | public InputStream getInputStream(ZipEntry entry) throws IOException {
method skip (line 158) | static void skip(ByteBuffer is, int i) {
method size (line 169) | public int size() {
method readCentralDir (line 185) | private void readCentralDir() throws IOException {
method throwZipException (line 268) | static void throwZipException(String msg, int magic) throws ZipExcepti...
method close (line 273) | @Override
class ZipInflaterInputStream (line 280) | static class ZipInflaterInputStream extends InflaterInputStream {
method ZipInflaterInputStream (line 284) | public ZipInflaterInputStream(InputStream is, Inflater inf, int bsiz...
method read (line 289) | @Override
method available (line 307) | @Override
class ByteBufferBackedInputStream (line 313) | private static class ByteBufferBackedInputStream extends InputStream {
method ByteBufferBackedInputStream (line 316) | public ByteBufferBackedInputStream(ByteBuffer buf) {
method read (line 320) | @Override
method read (line 328) | @Override
FILE: dex-reader/src/test/java/com/googlecode/d2j/reader/test/AsmfierTest.java
class AsmfierTest (line 40) | public class AsmfierTest implements DexConstants {
method test (line 41) | @Test
FILE: dex-reader/src/test/java/com/googlecode/d2j/reader/test/BadZipEntryFlagTest.java
class BadZipEntryFlagTest (line 19) | public class BadZipEntryFlagTest {
method test1 (line 20) | @Test
method test0 (line 32) | @Test
FILE: dex-reader/src/test/java/com/googlecode/d2j/reader/test/SkipDupMethod.java
class SkipDupMethod (line 12) | public class SkipDupMethod {
method test (line 13) | @Test
FILE: dex-tools/src/main/java/com/googlecode/d2j/signapk/AbstractJarSign.java
class AbstractJarSign (line 45) | public abstract class AbstractJarSign {
class SignatureOutputStream (line 47) | private static class SignatureOutputStream extends FilterOutputStream {
method SignatureOutputStream (line 51) | public SignatureOutputStream(OutputStream out, Signature sig) {
method size (line 57) | public int size() {
method write (line 61) | @Override
method write (line 72) | @Override
method write (line 83) | @Override
method copyFiles (line 106) | private static void copyFiles(Manifest manifest, JarFile in, JarOutput...
method AbstractJarSign (line 139) | public AbstractJarSign(PrivateKey privateKey) {
method AbstractJarSign (line 143) | public AbstractJarSign(PrivateKey privateKey, String digestAlg, String...
method addDigestsToManifest (line 154) | private Manifest addDigestsToManifest(JarFile jar) throws IOException,...
method encodeBase64 (line 201) | protected String encodeBase64(byte[] data) {
method sign (line 205) | public void sign(File in, File out) throws IOException, GeneralSecurit...
method writeSignatureBlock (line 275) | protected abstract void writeSignatureBlock(byte[] signature, OutputSt...
method writeSignatureFile (line 278) | private void writeSignatureFile(Manifest manifest, SignatureOutputStre...
FILE: dex-tools/src/main/java/com/googlecode/d2j/signapk/Base64.java
class Base64 (line 25) | public class Base64 {
class Coder (line 69) | static abstract class Coder {
method process (line 86) | public abstract boolean process(byte[] input, int offset, int len, b...
method maxOutputSize (line 93) | public abstract int maxOutputSize(int len);
method decode (line 115) | public static byte[] decode(String str, int flags) {
method decode (line 133) | public static byte[] decode(byte[] input, int flags) {
method decode (line 153) | public static byte[] decode(byte[] input, int offset, int len, int fla...
class Decoder (line 174) | static class Decoder extends Coder {
method Decoder (line 239) | public Decoder(int flags, byte[] output) {
method maxOutputSize (line 251) | public int maxOutputSize(int len) {
method process (line 261) | public boolean process(byte[] input, int offset, int len, boolean fi...
method encodeToString (line 452) | public static String encodeToString(byte[] input, int flags) {
method encodeToString (line 473) | public static String encodeToString(byte[] input, int offset, int len,...
method encode (line 491) | public static byte[] encode(byte[] input, int flags) {
method encode (line 507) | public static byte[] encode(byte[] input, int offset, int len, int fla...
class Encoder (line 540) | static class Encoder extends Coder {
method Encoder (line 579) | public Encoder(int flags, byte[] output) {
method maxOutputSize (line 597) | public int maxOutputSize(int len) {
method process (line 601) | public boolean process(byte[] input, int offset, int len, boolean fi...
method Base64 (line 738) | private Base64() { }
FILE: dex-tools/src/main/java/com/googlecode/d2j/signapk/SunJarSignImpl.java
class SunJarSignImpl (line 15) | public class SunJarSignImpl extends AbstractJarSign {
method SunJarSignImpl (line 18) | public SunJarSignImpl(X509Certificate cert, PrivateKey privateKey) {
method writeSignatureBlock (line 24) | @SuppressWarnings("all")
FILE: dex-tools/src/main/java/com/googlecode/d2j/signapk/TinySignImpl.java
class TinySignImpl (line 19) | public final class TinySignImpl extends AbstractJarSign {
method buildPrivateKey (line 21) | private static PrivateKey buildPrivateKey() {
method TinySignImpl (line 33) | public TinySignImpl() {
method writeSignatureBlock (line 41) | @Override
FILE: dex-tools/src/main/java/com/googlecode/d2j/tools/jar/BaseWeaver.java
class BaseWeaver (line 31) | public class BaseWeaver {
method buildMethodAName (line 46) | protected String buildMethodAName(String oldName) {
method buildCallbackMethodName (line 50) | protected String buildCallbackMethodName(String oldName) {
method findDefinedTargetMethod (line 54) | protected MtdInfo findDefinedTargetMethod(String owner, String name, S...
method findTargetMethod (line 58) | protected MtdInfo findTargetMethod(String owner, String name, String d...
method findTargetMethod0 (line 62) | protected MtdInfo findTargetMethod0(Map<MtdInfo, MtdInfo> map, String ...
method buildKey (line 86) | protected MtdInfo buildKey(String owner, String name, String desc) {
method withConfig (line 93) | public BaseWeaver withConfig(Path is) throws IOException {
method withConfig (line 97) | public BaseWeaver withConfig(InputStream is) throws IOException {
method withConfig (line 107) | public BaseWeaver withConfig(List<String> lines) {
method withConfig (line 114) | public void withConfig(String ln) {
method setInvocationInterfaceDesc (line 178) | public void setInvocationInterfaceDesc(String invocationInterfaceDesc) {
method toInternal (line 182) | protected static String toInternal(String key) {
method buildMethodInfo (line 189) | protected MtdInfo buildMethodInfo(String value) {
method getCurrentInvocationName (line 210) | public String getCurrentInvocationName() {
method nextInvocationName (line 214) | protected void nextInvocationName() {
class Callback (line 219) | public static class Callback {
class MtdInfo (line 227) | public static class MtdInfo {
method equals (line 232) | @Override
method hashCode (line 251) | @Override
FILE: dex-tools/src/main/java/com/googlecode/d2j/tools/jar/ClassInfo.java
class ClassInfo (line 8) | public class ClassInfo {
method ClassInfo (line 14) | public ClassInfo(String name) {
method equals (line 18) | public boolean equals(Object o) {
method hashCode (line 22) | public int hashCode() {
method toString (line 26) | public String toString() {
class MemberInfo (line 30) | public static class MemberInfo {
FILE: dex-tools/src/main/java/com/googlecode/d2j/tools/jar/DexWeaver.java
class DexWeaver (line 42) | public class DexWeaver extends BaseWeaver {
type CB (line 43) | interface CB {
method getKey (line 44) | String getKey(Method mtd);
method buildInvocationClz (line 47) | public String buildInvocationClz(DexFileVisitor dfv) {
method genSwitchMethod (line 163) | private void genSwitchMethod(DexClassVisitor dcv, String typeNameDesc,...
method wrap (line 199) | public DexFileVisitor wrap(DexFileVisitor dcv) {
method wrap (line 208) | public DexClassVisitor wrap(final String classNameDesc, final DexClass...
method join (line 456) | private String[] join(String a, String[] b) {
method isStatic (line 463) | private boolean isStatic(Op op) {
method isRange (line 467) | private boolean isRange(Op op) {
method unbox (line 480) | private void unbox(String argType, int i, DexCodeVisitor dcv) {
method isSuper (line 537) | private boolean isSuper(Op opcode) {
method build (line 541) | private Method build(MtdInfo mapTo) {
method box (line 550) | private void box(char type, int from, int to, DexCodeVisitor dcv) {
method haveThis (line 602) | private boolean haveThis(Op opcode) {
method countArgs (line 606) | static int countArgs(Method t) {
FILE: dex-tools/src/main/java/com/googlecode/d2j/tools/jar/InitOut.java
class InitOut (line 22) | public class InitOut {
method initEnumNames (line 43) | public InitOut initEnumNames() {
method initSourceNames (line 48) | public InitOut initSourceNames() {
method initAssertionNames (line 53) | public InitOut initAssertionNames() {
method doClass0 (line 58) | private void doClass0(String clz) {
method short4LongName (line 91) | private String short4LongName(String name) {
method doMember (line 99) | private void doMember(String owner, MemberInfo member, final int x) {
method collect (line 141) | private List<ClassInfo> collect(Path file) throws IOException {
method doPkg (line 276) | private void doPkg(String pkg) {
method from (line 295) | public InitOut from(Path from) {
method maxLength (line 300) | public InitOut maxLength(int m) {
method minLength (line 305) | public InitOut minLength(int m) {
method shouldRename (line 310) | private boolean shouldRename(String s) {
method to (line 314) | public void to(Path config) throws IOException {
method transformerMember (line 324) | private void transformerMember(String owner, List<MemberInfo> members) {
method transform (line 356) | private void transform(List<ClassInfo> classInfoList) {
class ClassInfo (line 368) | static private class ClassInfo {
method ClassInfo (line 375) | public ClassInfo(String name) {
method addField (line 379) | public MemberInfo addField(int access, String name, String type) {
method addMethod (line 385) | public MemberInfo addMethod(int access, String name, String desc) {
method toString (line 391) | public String toString() {
class MemberInfo (line 396) | private static class MemberInfo {
method MemberInfo (line 402) | public MemberInfo(int access, String name, String desc) {
class MemberInfoComparator (line 409) | private static class MemberInfoComparator implements Comparator<Member...
method compare (line 410) | @Override
FILE: dex-tools/src/main/java/com/googlecode/d2j/tools/jar/InvocationWeaver.java
class InvocationWeaver (line 111) | public class InvocationWeaver extends BaseWeaver implements Opcodes {
method mapDesc (line 115) | @Override
method box (line 125) | static private void box(Type arg, MethodVisitor mv) {
method unBox (line 160) | static private void unBox(Type orgRet, Type nRet, MethodVisitor mv) {
method wave0 (line 210) | public byte[] wave0(byte[] data) throws IOException {
method wave0 (line 216) | public void wave0(byte[] data, final ClassVisitor cv) throws IOExcepti...
method wrapper (line 220) | public ClassVisitor wrapper(final ClassVisitor cv) {
method wave (line 479) | public void wave(Path from, final Path to) throws IOException {
method buildInvocationClz (line 533) | public String buildInvocationClz(ClassVisitor cw) {
type CB (line 650) | interface CB {
method getKey (line 651) | String getKey(MtdInfo mtd);
method genSwitchMethod (line 654) | private void genSwitchMethod(ClassVisitor cw, String typeName, String ...
FILE: dex-tools/src/main/java/com/googlecode/d2j/tools/jar/ScanBridgeAdapter.java
class ScanBridgeAdapter (line 15) | public class ScanBridgeAdapter extends ClassVisitor implements Opcodes {
method ScanBridgeAdapter (line 19) | public ScanBridgeAdapter(ClassVisitor cv) {
method getBridge (line 32) | public Map<String, MemberInfo> getBridge() {
method visitMethod (line 36) | @Override
FILE: dex-tools/src/main/java/com/googlecode/d2j/tools/jar/WebApp.java
class WebApp (line 16) | public class WebApp {
method main (line 22) | public static void main(String[] args) throws IOException {
method copyDirectory (line 79) | private static void copyDirectory(final Path clz, final Path tmpClz) t...
FILE: dex-tools/src/main/java/com/googlecode/d2j/util/AccUtils.java
class AccUtils (line 5) | public class AccUtils {
method isBridge (line 6) | public static boolean isBridge(int acc) {
method isEnum (line 10) | public static boolean isEnum(int acc) {
method isFinal (line 14) | public static boolean isFinal(int acc) {
method isPrivate (line 18) | public static boolean isPrivate(int acc) {
method isProtected (line 22) | public static boolean isProtected(int acc) {
method isPublic (line 26) | public static boolean isPublic(int acc) {
method isStatic (line 30) | public static boolean isStatic(int acc) {
method isSynthetic (line 34) | public static boolean isSynthetic(int acc) {
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/bin_gen/BinGen.java
class BinGen (line 31) | public class BinGen {
method main (line 37) | public static void main(String[] args) throws IOException {
method setExec (line 91) | private static void setExec(Path path) {
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/ApkSign.java
class ApkSign (line 35) | @BaseCmd.Syntax(cmd = "d2j-apk-sign", syntax = "[options] <apk>", desc =...
method main (line 37) | public static void main(String... args) {
method doCommandLine (line 48) | @Override
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/AsmVerify.java
class AsmVerify (line 45) | @Syntax(cmd = "d2j-asm-verify", syntax = "[options] <jar0> [jar1 ... jar...
method getShortName (line 48) | private static String getShortName(final String name) {
method main (line 53) | public static void main(String... args) {
method printAnalyzerResult (line 67) | static void printAnalyzerResult(MethodNode method, Analyzer a, final P...
method doCommandLine (line 110) | @Override
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/BaksmaliBaseDexExceptionHandler.java
class BaksmaliBaseDexExceptionHandler (line 42) | public class BaksmaliBaseDexExceptionHandler extends BaseDexExceptionHan...
method hasException (line 52) | public boolean hasException() {
method handleFileException (line 56) | @Override
method handleMethodTranslateException (line 62) | @Override
method getVersionString (line 68) | public static String getVersionString() {
method doAddVersion (line 80) | private static void doAddVersion(List<String> vs, String pkg, Class<?>...
method dump (line 88) | public void dump(Path exFile, String[] originalArgs) {
method dumpTxt (line 103) | private void dumpTxt(Path exFile, String[] originalArgs) throws IOExce...
method dumGZip (line 110) | private void dumGZip(Path exFile, String[] originalArgs) throws IOExce...
method dumpTxt0 (line 117) | private void dumpTxt0(BufferedWriter writer, String[] originalArgs) th...
method dumpZip (line 130) | public void dumpZip(Path exFile, String[] originalArgs) throws IOExcep...
method dumpMethod (line 142) | private void dumpMethod(BufferedWriter writer, DexMethodNode dexMethod...
method dumpSummary (line 153) | private void dumpSummary(String[] originalArgs, BufferedWriter writer)...
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/ClassVersionSwitch.java
class ClassVersionSwitch (line 18) | public class ClassVersionSwitch {
method main (line 32) | public static void main(String... args) throws IOException {
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/DeObfInitCmd.java
class DeObfInitCmd (line 25) | public class DeObfInitCmd extends BaseCmd {
method DeObfInitCmd (line 35) | public DeObfInitCmd() {
method main (line 39) | public static void main(String... args) {
method doCommandLine (line 43) | @Override
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/DecryptStringCmd.java
class DecryptStringCmd (line 47) | @Syntax(cmd = "d2j-decrypt-string", syntax = "[options] <jar>", desc = "...
method main (line 49) | public static void main(String... args) {
class MethodConfig (line 77) | static class MethodConfig {
method hashCode (line 86) | @Override
method equals (line 96) | @Override
method build (line 124) | MethodConfig build(String line) {
method doCommandLine (line 155) | @Override
method toByteArray (line 217) | private byte[] toByteArray(ClassNode cn) {
method readClassNode (line 223) | private ClassNode readClassNode(byte[] data) {
method decrypt (line 230) | private boolean decrypt(ClassNode cn, Map<MethodConfig, MethodConfig> ...
method decryptByIr (line 238) | private boolean decryptByIr(ClassNode cn, Map<MethodConfig, MethodConf...
method decryptByStack (line 316) | private boolean decryptByStack(ClassNode cn, Map<MethodConfig, MethodC...
method optAndDecrypt (line 403) | public void optAndDecrypt(IrMethod irMethod, final Map<MethodConfig, M...
method v (line 466) | public static String v(Object[] vs) {
method convertIr2Jobj (line 484) | private Object convertIr2Jobj(Value value, String type) {
method buildMethodDesc (line 723) | private String buildMethodDesc(String[] args, String ret) {
method cleanDebug (line 732) | private void cleanDebug(MethodNode mn) {
method removeInsts (line 745) | void removeInsts(MethodNode m, MethodInsnNode mn, int pSize) {
method readArgumentValues (line 754) | Object[] readArgumentValues(MethodInsnNode mn, Method jmethod, int pSi...
method convert (line 765) | Object convert(Object object, Class<?> type) {
method loadMethods (line 801) | private Map<MethodConfig, MethodConfig> loadMethods(Path jar, List<Met...
method collectMethodConfigs (line 844) | private List<MethodConfig> collectMethodConfigs() throws IOException {
method findAnyMethodMatch (line 910) | private Method findAnyMethodMatch(Class<?> clz, String name, Class<?>[...
method readCst (line 939) | Object readCst(AbstractInsnNode q) {
method toJavaType (line 985) | Class<?>[] toJavaType(Type[] pt) throws ClassNotFoundException {
method toJavaType (line 993) | Class<?> toJavaType(Type t) throws ClassNotFoundException {
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/Dex2jarCmd.java
class Dex2jarCmd (line 29) | @BaseCmd.Syntax(cmd = "d2j-dex2jar", syntax = "[options] <file0> [file1 ...
method main (line 32) | public static void main(String... args) {
method doCommandLine (line 69) | @Override
method getVersionString (line 128) | @Override
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/Dex2jarMultiThreadCmd.java
class Dex2jarMultiThreadCmd (line 43) | @BaseCmd.Syntax(cmd = "d2j-mt-dex2jar", syntax = "[options] <file0> [fil...
method main (line 45) | public static void main(String... args) {
method doCommandLine (line 55) | @Override
method run0 (line 89) | private void run0(String fileName, final ExecutorService executorServi...
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/DexRecomputeChecksum.java
class DexRecomputeChecksum (line 27) | @BaseCmd.Syntax(cmd = "d2j-dex-recompute-checksum", syntax = "[options] ...
method main (line 29) | public static void main(String... args) {
method doCommandLine (line 38) | @Override
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/DexWeaverCmd.java
class DexWeaverCmd (line 21) | @BaseCmd.Syntax(cmd = "d2j-dex-weaver", syntax = "[options] dex", desc =...
method parseMethod (line 30) | static Method parseMethod(String str) {
method doCommandLine (line 41) | @Override
method main (line 140) | public static void main(String[] args) {
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/ExtractOdexFromCoredumpCmd.java
class ExtractOdexFromCoredumpCmd (line 16) | @BaseCmd.Syntax(cmd = "extract-odex-from-coredump", syntax = "<core.xxxx...
method main (line 18) | public static void main(String... args) {
method doCommandLine (line 22) | @Override
method extractDex (line 34) | private static void extractDex(SeekableByteChannel channel, List<Long>...
method copy (line 132) | private static void copy(SeekableByteChannel channel, SeekableByteChan...
method findPossibleOdexLocation (line 146) | private static List<Long> findPossibleOdexLocation(SeekableByteChannel...
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/GenerateCompileStubFromOdex.java
class GenerateCompileStubFromOdex (line 17) | @BaseCmd.Syntax(cmd = "d2j-generate-stub-from-odex", syntax = "[options]...
method main (line 22) | public static void main(String... args) {
method doCommandLine (line 31) | @Override
method doDex (line 63) | private void doDex(ByteBuffer bs, final Path out) {
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/Jar2Dex.java
class Jar2Dex (line 29) | @BaseCmd.Syntax(cmd = "d2j-jar2dex", syntax = "[options] <dir>", desc = ...
method main (line 31) | public static void main(String... args) {
method doCommandLine (line 40) | @Override
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/JarAccessCmd.java
class JarAccessCmd (line 27) | @BaseCmd.Syntax(cmd = "d2j-jar-access", syntax = "[options] <jar>", desc...
method main (line 29) | public static void main(String... args) {
method str2acc (line 54) | static int str2acc(String s) {
method doCommandLine (line 120) | @Override
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/JarWeaverCmd.java
class JarWeaverCmd (line 11) | @BaseCmd.Syntax(cmd = "d2j-jar-weaver", syntax = "[options] jar", desc =...
method doCommandLine (line 20) | @Override
method main (line 59) | public static void main(String[] args) {
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/StdApkCmd.java
class StdApkCmd (line 29) | @Syntax(cmd = "d2j-std-zip", syntax = "[options] <zip>", desc = "clean u...
method main (line 35) | public static void main(String... args) {
method doCommandLine (line 39) | @Override
FILE: dex-tools/src/main/java/com/googlecode/dex2jar/tools/to/Do.java
class Do (line 3) | public class Do {
method main (line 8) | public static void main(String[] args) {
FILE: dex-tools/src/test/java/com/googlecode/d2j/tools/jar/MethodInvocation.java
type MethodInvocation (line 4) | public interface MethodInvocation {
method proceed (line 5) | Object proceed() throws Throwable;
method getMethodOwner (line 7) | String getMethodOwner();
method getMethodName (line 9) | String getMethodName();
method getMethodDesc (line 11) | String getMethodDesc();
method getThis (line 13) | Object getThis();
method getArguments (line 15) | Object[] getArguments();
FILE: dex-tools/src/test/java/com/googlecode/d2j/tools/jar/test/DexWaveTest.java
class DexWaveTest (line 17) | public class DexWaveTest {
method testA (line 18) | @Test
method testB (line 33) | @Test
method test0 (line 46) | private void test0(DexWeaver iw, String prefix) throws IOException, Re...
method assertEqual (line 68) | private void assertEqual(DexClassNode expected, DexClassNode actual) t...
method toStd (line 74) | public static String toStd(DexClassNode expected) throws IOException {
FILE: dex-tools/src/test/java/com/googlecode/d2j/tools/jar/test/WaveTest.java
class WaveTest (line 19) | public class WaveTest {
method testA (line 20) | @Test
method testB (line 30) | @Test
method testC (line 43) | @Test
method test0 (line 55) | private void test0(InvocationWeaver iw, String prefix) throws IOExcept...
method assertEqual (line 75) | private void assertEqual(ClassNode expected, ClassNode actual) throws ...
method toStd (line 81) | public static String toStd(ClassNode expected) throws IOException {
FILE: dex-translator/src/main/java/com/googlecode/d2j/asm/LdcOptimizeAdapter.java
class LdcOptimizeAdapter (line 27) | public class LdcOptimizeAdapter extends MethodVisitor implements Opcodes {
method LdcOptimizeAdapter (line 32) | public LdcOptimizeAdapter(MethodVisitor mv) {
method visitLdcInsn (line 41) | @Override
method wrap (line 118) | public static MethodVisitor wrap(MethodVisitor mv) {
method wrap (line 122) | public static ClassVisitor wrap(ClassVisitor cv) {
FILE: dex-translator/src/main/java/com/googlecode/d2j/converter/Dex2IRConverter.java
class Dex2IRConverter (line 26) | public class Dex2IRConverter {
method sizeofType (line 39) | static int sizeofType(String s) {
class Dex2IrFrame (line 48) | static class Dex2IrFrame extends DvmFrame<DvmValue> {
method Dex2IrFrame (line 49) | public Dex2IrFrame(int totalRegister) {
method methodArgCount (line 54) | static int methodArgCount(String[] args) {
method convert (line 62) | public IrMethod convert(boolean isStatic, Method method, DexCodeNode d...
method fixExceptionHandlers (line 194) | private void fixExceptionHandlers() {
method initExceptionHandlers (line 270) | private void initExceptionHandlers(DexCodeNode dexCodeNode, BitSet[] e...
method addPhi (line 301) | private void addPhi(DvmValue v, Set<com.googlecode.dex2jar.ir.expr.Val...
method getLocal (line 321) | Local getLocal(DvmValue value) {
method addToQueue (line 329) | private void addToQueue(Queue<DvmValue> queue, DvmValue v) {
method setCurrentEmit (line 348) | private void setCurrentEmit(int index) {
method dfs (line 355) | private void dfs(BitSet[] exBranch, BitSet handlers, BitSet access, Dv...
method relate (line 461) | private void relate(DvmValue parent, DvmValue child) {
method merge (line 474) | void merge(Dex2IrFrame src, int dst) {
method newLocal (line 496) | private Local newLocal() {
method emit (line 502) | void emit(Stmt stmt) {
method initFirstFrame (line 506) | private Dex2IrFrame initFirstFrame(DexCodeNode methodNode, IrMethod ta...
method buildInterpreter (line 534) | private DvmInterpreter<DvmValue> buildInterpreter() {
method getLabels (line 1233) | private LabelStmt[] getLabels(DexLabel[] handler) {
method getLabel (line 1241) | LabelStmt getLabel(DexLabel label) {
method initParentCount (line 1250) | private void initParentCount(int[] parentCount) {
method indexOf (line 1275) | int indexOf(DexLabel label) {
class DvmValue (line 1280) | static class DvmValue {
method DvmValue (line 1285) | public DvmValue(Local thiz) {
method DvmValue (line 1289) | public DvmValue() {
FILE: dex-translator/src/main/java/com/googlecode/d2j/converter/IR2JConverter.java
class IR2JConverter (line 40) | @SuppressWarnings("incomplete-switch")
method IR2JConverter (line 45) | public IR2JConverter() {
method IR2JConverter (line 49) | public IR2JConverter(boolean optimizeSynchronized) {
method convert (line 54) | public void convert(IrMethod ir, MethodVisitor asm) {
method mapLabelStmt (line 60) | private void mapLabelStmt(IrMethod ir) {
method reBuildTryCatchBlocks (line 76) | private void reBuildTryCatchBlocks(IrMethod ir, MethodVisitor asm) {
method toInternal (line 95) | static String toInternal(String n) {
method reBuildInstructions (line 102) | private void reBuildInstructions(IrMethod ir, MethodVisitor asm) {
method isLocalWithIndex (line 393) | private static boolean isLocalWithIndex(Value v, int i) {
method insertI2x (line 404) | private static void insertI2x(String tos, String expect, MethodVisitor...
method isZeroOrNull (line 430) | static boolean isZeroOrNull(Value v1) {
method reBuildJumpInstructions (line 438) | private void reBuildJumpInstructions(IfStmt st, MethodVisitor asm) {
method getOpcode (line 528) | static int getOpcode(Value v, int op) {
method getOpcode (line 532) | static int getOpcode(String v, int op) {
method accept (line 559) | private static void accept(Value value, MethodVisitor asm) {
method reBuildEnExpression (line 598) | private static void reBuildEnExpression(EnExpr value, MethodVisitor as...
method box (line 723) | private static void box(String provideType, String expectedType, Metho...
method reBuildE1Expression (line 851) | private static void reBuildE1Expression(E1Expr e1, MethodVisitor asm) {
method reBuildE2Expression (line 918) | private static void reBuildE2Expression(E2Expr e2, MethodVisitor asm) {
method cast2 (line 1035) | private static void cast2(String t1, String t2, MethodVisitor asm) {
FILE: dex-translator/src/main/java/com/googlecode/d2j/converter/J2IRConverter.java
class J2IRConverter (line 22) | public class J2IRConverter {
method J2IRConverter (line 33) | private J2IRConverter() {
method convert (line 36) | public static IrMethod convert(String owner, MethodNode methodNode) th...
method getLabel (line 40) | LabelStmt getLabel(LabelNode labelNode) {
method emit (line 50) | void emit(Stmt stmt) {
method populate (line 54) | IrMethod populate(String owner, MethodNode source) {
method convert0 (line 69) | IrMethod convert0(String owner, MethodNode methodNode) throws Analyzer...
method addPhi (line 188) | private void addPhi(JvmValue v, Set<com.googlecode.dex2jar.ir.expr.Val...
method addToQueue (line 207) | private void addToQueue(Queue<JvmValue> queue, JvmValue v) {
method dfs (line 226) | private void dfs(BitSet[] exBranch, BitSet handlers, BitSet access, In...
method setCurrentEmit (line 312) | private void setCurrentEmit(int index) {
method buildInterpreter (line 319) | private Interpreter<JvmValue> buildInterpreter() {
method getLocal (line 822) | Local getLocal(JvmValue value) {
method initParentCount (line 830) | private void initParentCount(int[] parentCount) {
method mergeEx (line 864) | private void mergeEx(JvmFrame src, int dst) {
method merge (line 882) | private void merge(JvmFrame src, int dst) {
method relate (line 918) | private void relate(JvmValue parent, JvmValue child) {
method initFirstFrame (line 931) | private JvmFrame initFirstFrame(MethodNode methodNode, IrMethod target) {
method sizeOfType (line 949) | private int sizeOfType(String arg) {
method newLocal (line 959) | private Local newLocal() {
class JvmFrame (line 965) | static class JvmFrame extends Frame<JvmValue> {
method JvmFrame (line 967) | public JvmFrame(int nLocals, int nStack) {
method execute (line 971) | @Override
class JvmValue (line 988) | public static class JvmValue implements Value {
method JvmValue (line 994) | public JvmValue(int size, Local local) {
method JvmValue (line 999) | public JvmValue(int size) {
method getSize (line 1003) | @Override
FILE: dex-translator/src/main/java/com/googlecode/d2j/dex/BaseDexExceptionHandler.java
class BaseDexExceptionHandler (line 27) | public class BaseDexExceptionHandler implements DexExceptionHandler {
method handleFileException (line 28) | @Override
method handleMethodTranslateException (line 33) | @Override
FILE: dex-translator/src/main/java/com/googlecode/d2j/dex/ClassVisitorFactory.java
type ClassVisitorFactory (line 5) | public interface ClassVisitorFactory {
method create (line 13) | ClassVisitor create(String classInternalName);
FILE: dex-translator/src/main/java/com/googlecode/d2j/dex/Dex2Asm.java
class Dex2Asm (line 16) | public class Dex2Asm {
class Clz (line 18) | protected static class Clz {
method Clz (line 26) | public Clz(String name) {
method addInner (line 31) | void addInner(Clz clz) {
method equals (line 38) | @Override
method hashCode (line 55) | @Override
method toString (line 63) | public String toString() {
method clearClassAccess (line 91) | static private int clearClassAccess(boolean isInner, int access) {
method clearInnerAccess (line 105) | static private int clearInnerAccess(int access) {
method toInternalName (line 115) | protected static String toInternalName(DexType type) {
method toInternalName (line 119) | protected static String toInternalName(String desc) {
method accept (line 124) | public static void accept(DexAnnotationNode ann, ClassVisitor v) {
method accept (line 132) | public static void accept(List<DexAnnotationNode> anns, ClassVisitor c...
method accept (line 142) | public static void accept(List<DexAnnotationNode> anns, FieldVisitor f...
method accept (line 152) | public static void accept(List<DexAnnotationNode> anns, MethodVisitor ...
method accept (line 162) | public static void accept(DexAnnotationNode ann, MethodVisitor v) {
method acceptParameter (line 170) | public static void acceptParameter(DexAnnotationNode ann, int index, M...
method accept (line 178) | public static void accept(DexAnnotationNode ann, FieldVisitor v) {
method accept (line 186) | public static void accept(List<DexAnnotationNode.Item> items, Annotati...
method accept (line 192) | private static void accept(AnnotationVisitor dav, String name, Object ...
method collectBasicMethodInfo (line 227) | private static MethodVisitor collectBasicMethodInfo(DexMethodNode meth...
method collectClzInfo (line 267) | protected static Map<String, Clz> collectClzInfo(DexFileNode fileNode) {
method convertClass (line 327) | public void convertClass(DexClassNode classNode, ClassVisitorFactory c...
method convertClass (line 331) | public void convertClass(DexClassNode classNode, ClassVisitorFactory c...
method convertClass (line 334) | public void convertClass(int dexVersion, DexClassNode classNode, Class...
method isJavaIdentifier (line 338) | private static boolean isJavaIdentifier(String str) {
method convertClass (line 353) | public void convertClass(DexClassNode classNode, ClassVisitorFactory c...
method convertClass (line 356) | public void convertClass(DexFileNode dfn, DexClassNode classNode, Clas...
method convertClass (line 359) | public void convertClass(int dexVersion, DexClassNode classNode, Class...
method convertCode (line 450) | public void convertCode(DexMethodNode methodNode, MethodVisitor mv) {
method convertDex (line 456) | public void convertDex(DexFileNode fileNode, ClassVisitorFactory cvf) {
method convertField (line 465) | public void convertField(DexClassNode classNode, DexFieldNode fieldNod...
method convertConstantValues (line 497) | public static Object[] convertConstantValues(Object[] v) {
method convertConstantValue (line 507) | public static Object convertConstantValue(Object ele) {
method convertMethod (line 549) | public void convertMethod(DexClassNode classNode, DexMethodNode method...
method dex2ir (line 604) | public IrMethod dex2ir(DexMethodNode methodNode) {
method findAnnotationAttribute (line 609) | protected static Object findAnnotationAttribute(DexAnnotationNode ann,...
method get (line 618) | private static Clz get(Map<String, Clz> classes, String name) {
method ir2j (line 627) | public void ir2j(IrMethod irMethod, MethodVisitor mv) {
method optimize (line 632) | public void optimize(IrMethod irMethod) {
method searchEnclosing (line 677) | private static void searchEnclosing(Clz clz, List<InnerClassNode> inne...
method searchInnerClass (line 726) | private static void searchInnerClass(Clz clz, List<InnerClassNode> inn...
method compare (line 753) | @Override
FILE: dex-translator/src/main/java/com/googlecode/d2j/dex/Dex2IrAdapter.java
class Dex2IrAdapter (line 91) | public class Dex2IrAdapter extends DexCodeVisitor implements Opcodes, De...
method Dex2IrAdapter (line 108) | public Dex2IrAdapter(boolean isStatic, Method method) {
method toLabelStmt (line 123) | private LabelStmt toLabelStmt(DexLabel label) {
method countParameterRegisters (line 132) | static int countParameterRegisters(Method m, boolean isStatic) {
method x (line 148) | void x(Stmt stmt) {
method visitRegister (line 152) | @Override
method visitStmt2R1N (line 182) | @Override
method visitStmt3R (line 235) | @Override
method visitTypeStmt (line 402) | @Override
method visitFillArrayDataStmt (line 422) | @Override
method visitConstStmt (line 427) | @Override
method visitEnd (line 459) | @Override
method visitFieldStmt (line 466) | @Override
method visitFilledNewArrayStmt (line 510) | @Override
method visitJumpStmt (line 520) | @Override
method visitLabel (line 569) | @Override
method visitSparseSwitchStmt (line 574) | @Override
method visitMethodStmt (line 585) | @Override
method visitStmt1R (line 644) | @Override
method visitStmt2R (line 682) | @Override
method visitStmt0R (line 867) | @Override
method visitPackedSwitchStmt (line 885) | @Override
method visitTryCatch (line 896) | @Override
method convert (line 907) | public IrMethod convert(DexCodeNode codeNode) {
FILE: dex-translator/src/main/java/com/googlecode/d2j/dex/Dex2jar.java
class Dex2jar (line 47) | public class Dex2jar {
method from (line 48) | public static Dex2jar from(byte[] in) throws IOException {
method from (line 52) | public static Dex2jar from(ByteBuffer in) throws IOException {
method from (line 56) | public static Dex2jar from(BaseDexFileReader reader) {
method from (line 60) | public static Dex2jar from(File in) throws IOException {
method from (line 64) | public static Dex2jar from(InputStream in) throws IOException {
method from (line 68) | public static Dex2jar from(String in) throws IOException {
method Dex2jar (line 78) | private Dex2jar(BaseDexFileReader reader) {
method doTranslate (line 84) | private void doTranslate(final Path dist) throws IOException {
method getExceptionHandler (line 179) | public DexExceptionHandler getExceptionHandler() {
method getReader (line 183) | public BaseDexFileReader getReader() {
method reUseReg (line 187) | public Dex2jar reUseReg(boolean b) {
method topoLogicalSort (line 196) | public Dex2jar topoLogicalSort(boolean b) {
method noCode (line 205) | public Dex2jar noCode(boolean b) {
method optimizeSynchronized (line 214) | public Dex2jar optimizeSynchronized(boolean b) {
method printIR (line 223) | public Dex2jar printIR(boolean b) {
method reUseReg (line 232) | public Dex2jar reUseReg() {
method optimizeSynchronized (line 237) | public Dex2jar optimizeSynchronized() {
method printIR (line 242) | public Dex2jar printIR() {
method topoLogicalSort (line 247) | public Dex2jar topoLogicalSort() {
method setExceptionHandler (line 252) | public void setExceptionHandler(DexExceptionHandler exceptionHandler) {
method skipDebug (line 256) | public Dex2jar skipDebug(boolean b) {
method skipDebug (line 265) | public Dex2jar skipDebug() {
method to (line 270) | public void to(Path file) throws IOException {
method createZip (line 280) | private static FileSystem createZip(Path output) throws IOException {
method withExceptionHandler (line 297) | public Dex2jar withExceptionHandler(DexExceptionHandler exceptionHandl...
method skipExceptions (line 302) | public Dex2jar skipExceptions(boolean b) {
FILE: dex-translator/src/main/java/com/googlecode/d2j/dex/DexExceptionHandler.java
type DexExceptionHandler (line 23) | public interface DexExceptionHandler {
method handleFileException (line 24) | public void handleFileException(Exception e);
method handleMethodTranslateException (line 26) | public void handleMethodTranslateException(Method method, DexMethodNod...
FILE: dex-translator/src/main/java/com/googlecode/d2j/dex/DexFix.java
class DexFix (line 38) | public class DexFix {
method fixStaticFinalFieldValue (line 41) | public static void fixStaticFinalFieldValue(final DexFileNode dex) {
method fixStaticFinalFieldValue (line 56) | public static void fixStaticFinalFieldValue(final DexClassNode classNo...
method getDefaultValueOfType (line 129) | private static Object getDefaultValueOfType(char t) {
method isPrimitiveZero (line 155) | static boolean isPrimitiveZero(String desc, Object value) {
FILE: dex-translator/src/main/java/com/googlecode/d2j/dex/ExDex2Asm.java
class ExDex2Asm (line 27) | public class ExDex2Asm extends Dex2Asm {
method ExDex2Asm (line 30) | public ExDex2Asm(DexExceptionHandler exceptionHandler) {
method convertCode (line 34) | @Override
FILE: dex-translator/src/main/java/com/googlecode/d2j/dex/LambadaNameSafeClassAdapter.java
class LambadaNameSafeClassAdapter (line 7) | public class LambadaNameSafeClassAdapter extends RemappingClassAdapter {
method getClassName (line 8) | public String getClassName() {
method LambadaNameSafeClassAdapter (line 12) | public LambadaNameSafeClassAdapter(ClassVisitor cv) {
FILE: dex-translator/src/main/java/com/googlecode/d2j/dex/V3.java
class V3 (line 23) | public class V3 {
FILE: dex-translator/src/main/java/com/googlecode/d2j/util/Types.java
class Types (line 8) | public class Types {
method getParameterTypeDesc (line 14) | public static String[] getParameterTypeDesc(String desc) {
method getReturnTypeDesc (line 33) | public static String getReturnTypeDesc(String desc) {
method listDesc (line 41) | public static List<String> listDesc(String desc) {
method buildDexStyleSignature (line 95) | public static Object[] buildDexStyleSignature(String signature) {
FILE: dex-translator/src/main/java/org/objectweb/asm/AsmBridge.java
class AsmBridge (line 21) | public class AsmBridge {
method searchMethodWriter (line 22) | public static MethodVisitor searchMethodWriter(MethodVisitor mv) {
method sizeOfMethodWriter (line 29) | public static int sizeOfMethodWriter(MethodVisitor mv) {
method removeMethodWriter (line 34) | private static void removeMethodWriter(MethodWriter mw) {
method replaceMethodWriter (line 58) | public static void replaceMethodWriter(MethodVisitor mv, MethodNode mn) {
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/ASMifierTest.java
class ASMifierTest (line 32) | public class ASMifierTest {
method getBaseName (line 33) | public static String getBaseName(String fn) {
method test (line 38) | @Test
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/ArrayTypeTest.java
class ArrayTypeTest (line 23) | @RunWith(DexTranslatorRunner.class)
method a120 (line 26) | @Test
method a122 (line 41) | @Test
method a123 (line 54) | @Test
method merge1 (line 68) | @Test
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/AutoCastTest.java
class AutoCastTest (line 15) | public class AutoCastTest implements DexConstants {
method strict (line 32) | public static void strict(DexClassVisitor cv) {
method test (line 57) | @Test
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/D2jTest.java
class D2jTest (line 42) | @RunWith(D2jTest.S.class)
class S (line 45) | public static class S extends ParentRunner<Runner> {
method S (line 47) | public S(Class<?> klass) throws InitializationError {
method init (line 54) | public void init(final Class<?> testClass) throws InitializationError {
method readDex (line 91) | private DexFileNode readDex(Path f) {
method getChildren (line 103) | @Override
method describeChild (line 108) | @Override
method runChild (line 113) | @Override
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/DexTranslatorRunner.java
class DexTranslatorRunner (line 12) | public class DexTranslatorRunner extends BlockJUnit4ClassRunner {
method DexTranslatorRunner (line 14) | public DexTranslatorRunner(Class klass) throws InitializationError {
method methodInvoker (line 18) | @Override
method validateTestMethods (line 40) | @Override
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/EmptyTrapTest.java
class EmptyTrapTest (line 16) | @RunWith(DexTranslatorRunner.class)
method m005_toJSONString (line 19) | @Test
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/I101Test.java
class I101Test (line 18) | public class I101Test {
method a (line 20) | public static void a(DexClassVisitor cv) {
method test (line 45) | @Test
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/I121Test.java
class I121Test (line 14) | @RunWith(DexTranslatorRunner.class)
method i121 (line 17) | @Test
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/I168Test.java
class I168Test (line 21) | @RunWith(DexTranslatorRunner.class)
method i168 (line 24) | @Test
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/I63Test.java
class I63Test (line 18) | @RunWith(DexTranslatorRunner.class)
method i63 (line 21) | @Test
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/Issue71Test.java
class Issue71Test (line 33) | @RunWith(DexTranslatorRunner.class)
method i71 (line 35) | @Test
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/OptSyncTest.java
class OptSyncTest (line 18) | @RunWith(DexTranslatorRunner.class)
method a (line 21) | public void a() {
method b (line 27) | public void b() {
method c (line 34) | public void c() {
method test (line 65) | @Test
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/ResTest.java
class ResTest (line 42) | @RunWith(ResTest.R.class)
class FileSet (line 45) | public static class FileSet {
class R (line 50) | public static class R extends ParentRunner<FileSet> {
method R (line 51) | public R(Class<?> testClass) throws InitializationError {
method init (line 59) | void init(Class<?> testClass) {
method getChildren (line 84) | @Override
method describeChild (line 89) | @Override
method runChild (line 94) | @Override
method getBaseName (line 112) | public static String getBaseName(String fn) {
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/Smali2jTest.java
class Smali2jTest (line 48) | @RunWith(Smali2jTest.S.class)
class S (line 51) | public static class S extends ParentRunner<Runner> {
method S (line 53) | public S(Class<?> klass) throws InitializationError {
method init (line 60) | public void init(final Class<?> testClass) throws InitializationError {
method getChildren (line 135) | @Override
method describeChild (line 140) | @Override
method runChild (line 145) | @Override
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/TestDexClassV.java
class TestDexClassV (line 12) | @Ignore
method TestDexClassV (line 17) | public TestDexClassV(String clz, int config) {
method toByteArray (line 24) | public byte[] toByteArray() {
method visitMethod (line 29) | @Override
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/TestUtils.java
class TestUtils (line 78) | @Ignore
method breakPoint (line 81) | public static void breakPoint() {
method checkZipFile (line 84) | public static void checkZipFile(File zip) throws ZipException, Excepti...
method dex (line 100) | public static File dex(File file, File distFile) throws Exception {
method dex (line 104) | public static File dex(File[] files) throws Exception {
method dex (line 108) | public static File dex(File[] files, File distFile) throws Exception {
method dexP (line 112) | public static File dexP(List<Path> files, File distFile) throws Except...
method dex (line 128) | public static File dex(List<File> files, File distFile) throws Excepti...
method getShortName (line 144) | private static String getShortName(final String name) {
method listTestDexFiles (line 149) | public static List<Path> listTestDexFiles() {
method listPath (line 161) | public static List<Path> listPath(File file, final String... exts) {
method printAnalyzerResult (line 199) | static void printAnalyzerResult(MethodNode method, Analyzer a, final P...
method verify (line 231) | public static void verify(final ClassReader cr) throws AnalyzerExcepti...
method verify (line 240) | @SuppressWarnings("rawtypes")
method testDexASMifier (line 274) | public static byte[] testDexASMifier(Class<?> clz, String methodName) ...
method testDexASMifier (line 278) | public static byte[] testDexASMifier(Class<?> clz, String methodName, ...
method translateAndCheck (line 294) | public static byte[] translateAndCheck(DexFileNode fileNode, DexClassN...
method translateAndCheck (line 357) | public static byte[] translateAndCheck(DexClassNode clzNode) throws An...
method defineClass (line 361) | public static Class<?> defineClass(String type, byte[] data) {
class CL (line 365) | static class CL extends ClassLoader {
method xxxDefine (line 366) | public Class<?> xxxDefine(String type, byte[] data) {
FILE: dex-translator/src/test/java/com/googlecode/dex2jar/test/ZeroTest.java
class ZeroTest (line 14) | @RunWith(DexTranslatorRunner.class)
method testZero (line 16) | @Test
FILE: dex-translator/src/test/java/dex2jar/gen/FTPClient__parsePassiveModeReply.java
class FTPClient__parsePassiveModeReply (line 16) | @RunWith(DexTranslatorRunner.class)
method m003___parsePassiveModeReply (line 18) | @Test
FILE: dex-translator/src/test/java/res/ArrayRes.java
class ArrayRes (line 22) | public class ArrayRes {
method array (line 24) | void array() {
method adadfasd (line 34) | void adadfasd() {
method adssss (line 50) | Object adssss() {
method bb (line 55) | void bb(int... aaaaa) {
FILE: dex-translator/src/test/java/res/ChineseRes.java
class ChineseRes (line 22) | public class ChineseRes {
method 你 (line 23) | public void 你() {
FILE: dex-translator/src/test/java/res/ConstValues.java
type ConstValues (line 3) | public interface ConstValues {
type Abc (line 49) | enum Abc {
FILE: dex-translator/src/test/java/res/ExceptionRes.java
class ExceptionRes (line 22) | public class ExceptionRes {
method a (line 23) | public int a() {
FILE: dex-translator/src/test/java/res/Gh28Type.java
class Gh28Type (line 8) | public class Gh28Type {
method onCreate (line 10) | protected void onCreate() {
method a (line 26) | private void a(double[] t0) {
FILE: dex-translator/src/test/java/res/I142_annotation_default.java
type AA (line 5) | enum AA {
FILE: dex-translator/src/test/java/res/I56_AccessFlag.java
class I56_AccessFlag (line 22) | public class I56_AccessFlag {
class AStaticInnerClass (line 23) | static class AStaticInnerClass {
class AInnerClass (line 26) | class AInnerClass {
class AAA (line 27) | class AAA {
type AInterface (line 31) | interface AInterface {
class B1 (line 34) | public static class B1 {
class B11 (line 37) | public static class B11 {
class XXX1 (line 38) | public static class XXX1 {
class B2 (line 42) | private static class B2 {
class B3 (line 45) | protected static class B3 {
class B0 (line 48) | static class B0 {
class B4 (line 51) | final static class B4 {
class C0 (line 54) | class C0 {
class C1 (line 57) | public class C1 {
class C2 (line 60) | private class C2 {
class C3 (line 63) | protected class C3 {
class C4 (line 66) | final class C4 {
class C5 (line 69) | abstract class C5 {
method sync1 (line 72) | synchronized void sync1() {
method sync2 (line 86) | synchronized void sync2() {
method a (line 90) | void a() {
type AStaticInterface (line 103) | static interface AStaticInterface {
FILE: dex-translator/src/test/java/res/I71.java
class I71 (line 3) | public class I71 {
method size (line 10) | public int size() {
FILE: dex-translator/src/test/java/res/I73.java
class I73 (line 3) | public class I73 {
method a (line 4) | String a() {
FILE: dex-translator/src/test/java/res/I88.java
class I88 (line 10) | @A
method main (line 13) | public static void main(String... args) {
method I88 (line 18) | @A
method a (line 25) | @A
FILE: dex-translator/src/test/java/res/LongDoubleRes.java
class LongDoubleRes (line 22) | public class LongDoubleRes {
method a (line 23) | long a(double d, double d2, long l1, long l2) {
FILE: dex-translator/src/test/java/res/NoEndRes.java
class NoEndRes (line 9) | public class NoEndRes {
method b (line 10) | public void b() {
method a (line 13) | public void a() {
FILE: dex-translator/src/test/java/res/NullZero.java
class NullZero (line 22) | public class NullZero {
method nullzero (line 23) | void nullzero() {
FILE: dex-translator/src/test/java/res/OptimizeSynchronized.java
class OptimizeSynchronized (line 5) | public class OptimizeSynchronized {
method a (line 6) | public void a() {
method b (line 14) | public void b() {
method c (line 20) | public void c() {
method d (line 26) | public void d() {
FILE: dex-translator/src/test/java/res/PopRes.java
class PopRes (line 22) | public class PopRes {
method aaa (line 24) | long aaa() {
method bbb (line 28) | void bbb() {
FILE: dex-translator/src/test/java/res/ResChild.java
class ResChild (line 3) | public class ResChild extends ResParent {
method someMethod (line 4) | @Override
method anotherMethod (line 10) | public void anotherMethod() {
FILE: dex-translator/src/test/java/res/ResParent.java
class ResParent (line 3) | public class ResParent {
method someMethod (line 4) | public void someMethod(int a, String b) {
method bbb (line 7) | public void bbb(int a, String b) {
FILE: dex-translator/src/test/java/res/SwitchRes.java
class SwitchRes (line 22) | public class SwitchRes {
method sw1 (line 24) | void sw1() {
method sw2 (line 41) | void sw2() {
FILE: dex-translator/src/test/java/res/U0000String.java
class U0000String (line 3) | public class U0000String {
method a (line 4) | void a() {
FILE: dex-translator/src/test/java/res/WideRes.java
class WideRes (line 22) | public class WideRes {
method aaa (line 23) | float aaa() {
method bbb (line 33) | double bbb() {
method ccc (line 43) | int ccc() {
method ddd (line 54) | long ddd() {
FILE: dex-translator/src/test/java/res/i55/AAbstractClass.java
class AAbstractClass (line 22) | public abstract class AAbstractClass {
FILE: dex-translator/src/test/java/res/i55/AClass.java
class AClass (line 22) | public class AClass {
FILE: dex-translator/src/test/java/res/i55/AInterface.java
type AInterface (line 22) | public interface AInterface {
FILE: dex-writer/src/main/java/com/googlecode/d2j/dex/writer/AnnotationWriter.java
class AnnotationWriter (line 29) | class AnnotationWriter extends DexAnnotationVisitor {
method AnnotationWriter (line 33) | public AnnotationWriter(List<AnnotationElement> elements, ConstPool cp) {
method newAnnotationElement (line 38) | AnnotationElement newAnnotationElement(String name) {
method visit (line 46) | public void visit(String name, Object value) {
method visitAnnotation (line 61) | @Override
method visitArray (line 73) | @Override
method visitEnum (line 81) | @Override
class EncodedArrayAnnWriter (line 88) | class EncodedArrayAnnWriter extends DexAnnotationVisitor {
method EncodedArrayAnnWriter (line 91) | public EncodedArrayAnnWriter(EncodedArray encodedArray) {
method visit (line 96) | @Override
method visitAnnotation (line 111) | @Override
method visitArray (line 122) | @Override
method visitEnum (line 131) | @Override
FILE: dex-writer/src/main/java/com/googlecode/d2j/dex/writer/CantNotFixContentException.java
class CantNotFixContentException (line 21) | public class CantNotFixContentException extends RuntimeException {
method CantNotFixContentException (line 24) | public CantNotFixContentException(Op op, String contentName, int v) {
method CantNotFixContentException (line 29) | public CantNotFixContentException(Op op, String contentName, long v) {
FILE: dex-writer/src/main/java/com/googlecode/d2j/dex/writer/ClassWriter.java
class ClassWriter (line 29) | class ClassWriter extends DexClassVisitor implements DexConstants {
method ClassWriter (line 35) | public ClassWriter(ClassDefItem defItem, ConstPool cp) {
method visitAnnotation (line 41) | @Override
method visitEnd (line 54) | public void visitEnd() {
method visitField (line 63) | @Override
method visitMethod (line 80) | @Override
method visitSource (line 95) | @Override
FILE: dex-writer/src/main/java/com/googlecode/d2j/dex/writer/CodeWriter.java
class CodeWriter (line 35) | @SuppressWarnings("incomplete-switch")
method CodeWriter (line 50) | public CodeWriter(ClassDataItem.EncodedMethod encodedMethod, CodeItem ...
method checkContentByte (line 73) | public static void checkContentByte(Op op, String cc, int v) {
method checkContentS4bit (line 79) | public static void checkContentS4bit(Op op, String name, int v) {
method checkContentShort (line 85) | public static void checkContentShort(Op op, String cccc, int v) {
method checkContentU4bit (line 91) | public static void checkContentU4bit(Op op, String name, int v) {
method checkContentUByte (line 97) | public static void checkContentUByte(Op op, String cc, int v) {
method checkContentUShort (line 103) | public static void checkContentUShort(Op op, String cccc, int v) {
method checkRegA (line 109) | public static void checkRegA(Op op, String s, int reg) {
method checkRegAA (line 115) | public static void checkRegAA(Op op, String s, int reg) {
method checkRegAAAA (line 121) | static void checkRegAAAA(Op op, String s, int reg) {
method copy (line 127) | static byte[] copy(ByteBuffer b) {
method add (line 134) | public void add(Insn insn) {
method build10x (line 138) | private byte[] build10x(Op op) {
method build11n (line 146) | private byte[] build11n(Op op, int vA, int B) {
method build11x (line 155) | private byte[] build11x(Op op, int vAA) {
method build12x (line 164) | private byte[] build12x(Op op, int vA, int vB) {
method build21h (line 174) | private byte[] build21h(Op op, int vAA, Number value) {
method build21s (line 197) | private byte[] build21s(Op op, int vAA, Number value) {
method build22b (line 216) | private byte[] build22b(Op op, int vAA, int vBB, int cc) {
method build22s (line 227) | private byte[] build22s(Op op, int A, int B, int CCCC) {
method build22x (line 238) | private byte[] build22x(Op op, int vAA, int vBBBB) {
method build23x (line 247) | private byte[] build23x(Op op, int vAA, int vBB, int vCC) {
method build31i (line 257) | private byte[] build31i(Op op, int vAA, Number value) {
method build32x (line 277) | private byte[] build32x(Op op, int vAAAA, int vBBBB) {
method build51l (line 286) | private byte[] build51l(Op op, int vAA, Number value) {
method getLabel (line 295) | Label getLabel(DexLabel label) {
method visitFillArrayDataStmt (line 304) | @Override
method visitConstStmt (line 391) | @Override
method visitEnd (line 418) | @Override
method visitFieldStmt (line 460) | @Override
method visitFilledNewArrayStmt (line 465) | @Override
method visitJumpStmt (line 474) | @Override
method visitLabel (line 480) | @Override
method visitMethodStmt (line 485) | @Override
method visitPackedSwitchStmt (line 497) | @Override
method visitRegister (line 522) | @Override
method visitSparseSwitchStmt (line 527) | @Override
method visitStmt0R (line 555) | @Override
method visitStmt1R (line 574) | @Override
method visitStmt2R (line 589) | @Override
method visitStmt2R1N (line 612) | @Override
method visitStmt3R (line 630) | @Override
method visitTryCatch (line 638) | @Override
method visitTypeStmt (line 658) | @Override
class IndexedInsn (line 663) | public static class IndexedInsn extends OpInsn {
method IndexedInsn (line 667) | public IndexedInsn(Op op, int a, int b, BaseItem idxItem) {
method write (line 688) | @Override
method fit (line 706) | public void fit() {
class OP35c (line 713) | public static class OP35c extends OpInsn {
method OP35c (line 717) | public OP35c(Op op, int[] args, BaseItem item) {
method write (line 745) | @Override
class OP3rc (line 754) | public static class OP3rc extends OpInsn {
method OP3rc (line 759) | public OP3rc(Op op, int[] args, BaseItem item) {
method write (line 778) | @Override
method visitDebug (line 785) | @Override
FILE: dex-writer/src/main/java/com/googlecode/d2j/dex/writer/DexFileWriter.java
class DexFileWriter (line 36) | public class DexFileWriter extends DexFileVisitor {
method wrapDumpOut (line 42) | static private DataOut wrapDumpOut(final DataOut out0) {
method buildMapListItem (line 100) | void buildMapListItem() {
method toByteArray (line 212) | public byte[] toByteArray() {
method updateChecksum (line 239) | public static void updateChecksum(ByteBuffer buffer, int size) {
method write (line 259) | private void write(DataOut out) {
method place (line 277) | private int place() {
method visit (line 301) | @Override
FILE: dex-writer/src/main/java/com/googlecode/d2j/dex/writer/DexWriteException.java
class DexWriteException (line 19) | public class DexWriteException extends RuntimeException {
method DexWriteException (line 23) | public DexWriteException() {
method DexWriteException (line 28) | public DexWriteException(String message) {
method DexWriteException (line 33) | public DexWriteException(String message, Throwable cause) {
method DexWriteException (line 38) | public DexWriteException(String message, Throwable cause,
method DexWriteException (line 44) | public DexWriteException(Throwable cause) {
FILE: dex-writer/src/main/java/com/googlecode/d2j/dex/writer/FieldWriter.java
class FieldWriter (line 27) | class FieldWriter extends DexFieldVisitor {
method FieldWriter (line 31) | public FieldWriter(ClassDataItem.EncodedField encodedField, ConstPool ...
method visitAnnotation (line 36) | @Override
FILE: dex-writer/src/main/java/com/googlecode/d2j/dex/writer/MethodWriter.java
class MethodWriter (line 27) | class MethodWriter extends DexMethodVisitor {
method MethodWriter (line 34) | public MethodWriter(ClassDataItem.EncodedMethod encodedMethod, Method m,
method visitAnnotation (line 43) | @Override
method visitCode (line 57) | @Override
method visitParameterAnnotation (line 63) | @Override
FILE: dex-writer/src/main/java/com/googlecode/d2j/dex/writer/ev/EncodedAnnotation.java
class EncodedAnnotation (line 28) | public class EncodedAnnotation {
method equals (line 29) | @Override
method hashCode (line 42) | @Override
class AnnotationElement (line 49) | public static class AnnotationElement {
method equals (line 53) | @Override
method hashCode (line 66) | @Override
method place (line 78) | public int place(int offset) {
method write (line 88) | public void write(DataOut out) {
FILE: dex-writer/src/main/java/com/googlecode/d2j/dex/writer/ev/EncodedArray.java
class EncodedArray (line 25) | public class EncodedArray {
method equals (line 29) | @Override
method hashCode (line 41) | @Override
method place (line 46) | public int place(int offset) {
method write (line 54) | public void write(DataOut out) {
Condensed preview — 403 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,490K chars).
[
{
"path": ".hgignore",
"chars": 156,
"preview": "syntax: glob\r\n*/target/*\r\ntarget/*\r\n*/build\r\nbuild\r\n*/.project\r\n*/.classpath\r\n*/.*\r\n\r\n.*\r\n*.bak\r\n*.orig\r\n*/nb-configurat"
},
{
"path": ".hgtags",
"chars": 486,
"preview": "9361e645790f70de30f5ca05bff21f55ecddaddc 0.0.6\n4713eec717a35774e6d34ac0819982d2bc34bdc5 0.0.7\n6743b6bb8a38b17fe13ca54ede"
},
{
"path": ".travis.yml",
"chars": 31,
"preview": "language: java\njdk:\n- openjdk8\n"
},
{
"path": "LICENSE.txt",
"chars": 11562,
"preview": "\r\n Apache License\r\n Version 2.0, January 2004\r\n "
},
{
"path": "NOTICE.txt",
"chars": 341,
"preview": "dex2jar - Tools to work with android .dex and java .class files\r\nCopyright (c) 2009-2014 Panxiaobo\r\n\r\ncontributors\r\n - "
},
{
"path": "README.md",
"chars": 2225,
"preview": "**Project move to [SourceForge](https://sourceforge.net/p/dex2jar) and [Bitbucket](https://bitbucket.org/pxb1988/dex2jar"
},
{
"path": "build.gradle",
"chars": 1969,
"preview": "allprojects {\n apply plugin: 'maven'\n apply plugin: 'idea'\n apply plugin: 'eclipse'\n group = 'com.googlecode.d2j'\n "
},
{
"path": "d2j-base-cmd/build.gradle",
"chars": 54,
"preview": "description = 'a simple cmd parser'\n\ndependencies {\n}\n"
},
{
"path": "d2j-base-cmd/src/main/java/com/googlecode/dex2jar/tools/BaseCmd.java",
"chars": 19872,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licens"
},
{
"path": "d2j-j6/README.md",
"chars": 2021,
"preview": "# j6 Generate dex2jar for jdk6\ndex2jar 2.0 change the compile jdk to version 1.7, but there still requirement for runnin"
},
{
"path": "d2j-j6/build.gradle",
"chars": 2127,
"preview": "configurations {\n jarjar\n proguard\n}\ndependencies {\n compile project(':dex-tools')\n jarjar 'com.googlecode.j"
},
{
"path": "d2j-j6/j6-weave.txt",
"chars": 319,
"preview": "#\nr Ljava/io/File;.toPath=Lj6/Files;.toPath(Ljava/io/File;)Ljava/lang/Object;\nr Ljava/lang/Throwable;.addSuppressed(Ljav"
},
{
"path": "d2j-j6/jarjar-rules.txt",
"chars": 153,
"preview": "rule java.nio.file.** pxb.@0\nrule java.nio.charset.StandardCharsets pxb.java.nio.charset.StandardCharsets\nrule java.lang"
},
{
"path": "d2j-j6/proguard.txt",
"chars": 420,
"preview": "-libraryjars <java.home>/lib/rt.jar\n-keepattributes AnnotationDefault,RuntimeVisible*Annotations,Signature\n-repackagecla"
},
{
"path": "d2j-j6/src/main/java/j6/Files.java",
"chars": 229,
"preview": "package j6;\n\nimport pxb.java.nio.file.spi.FileSystemProvider;\n\nimport java.io.File;\n\npublic class Files {\n public sta"
},
{
"path": "d2j-j6/src/main/java/j6/Thro.java",
"chars": 672,
"preview": "package j6;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic "
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/charset/StandardCharsets.java",
"chars": 229,
"preview": "package pxb.java.nio.charset;\n\nimport java.nio.charset.Charset;\n\npublic class StandardCharsets {\n public static Chars"
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/CopyOption.java",
"chars": 60,
"preview": "package pxb.java.nio.file;\n\npublic interface CopyOption {\n}\n"
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/FileSystem.java",
"chars": 177,
"preview": "package pxb.java.nio.file;\n\nimport java.io.Closeable;\n\npublic abstract class FileSystem implements Closeable {\n publi"
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/FileVisitResult.java",
"chars": 114,
"preview": "package pxb.java.nio.file;\n\n\npublic enum FileVisitResult {\n CONTINUE,TERMINATE,SKIP_SUBTREE, SKIP_SIBLINGS;\n}\n"
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/FileVisitor.java",
"chars": 543,
"preview": "package pxb.java.nio.file;\n\nimport java.io.IOException;\nimport pxb.java.nio.file.attribute.BasicFileAttributes;\n\npublic "
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/Files.java",
"chars": 2161,
"preview": "package pxb.java.nio.file;\n\n\nimport pxb.java.nio.file.attribute.FileAttribute;\nimport pxb.java.nio.file.spi.FileSystemPr"
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/LinkOption.java",
"chars": 60,
"preview": "package pxb.java.nio.file;\n\npublic interface LinkOption {\n}\n"
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/OpenOption.java",
"chars": 60,
"preview": "package pxb.java.nio.file;\n\npublic interface OpenOption {\n}\n"
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/Path.java",
"chars": 742,
"preview": "package pxb.java.nio.file;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io."
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/SimpleFileVisitor.java",
"chars": 872,
"preview": "package pxb.java.nio.file;\n\nimport pxb.java.nio.file.attribute.BasicFileAttributes;\n\nimport java.io.IOException;\n\npublic"
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/attribute/BasicFileAttributes.java",
"chars": 79,
"preview": "package pxb.java.nio.file.attribute;\n\npublic interface BasicFileAttributes {\n}\n"
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/attribute/FileAttribute.java",
"chars": 76,
"preview": "package pxb.java.nio.file.attribute;\n\npublic interface FileAttribute<T> {\n}\n"
},
{
"path": "d2j-j6/src/main/java/pxb/java/nio/file/spi/FileSystemProvider.java",
"chars": 14100,
"preview": "package pxb.java.nio.file.spi;\n\nimport pxb.java.nio.file.FileSystem;\nimport pxb.java.nio.file.FileVisitor;\nimport pxb.ja"
},
{
"path": "d2j-jasmin/build.gradle",
"chars": 322,
"preview": "apply plugin: 'antlr'\n\ndependencies {\n compile(group: 'org.antlr', name: 'antlr-runtime', version:'3.5.2') {\n ex"
},
{
"path": "d2j-jasmin/src/main/antlr3/com/googlecode/d2j/jasmin/Jasmin.g",
"chars": 50917,
"preview": "grammar Jasmin;\r\n\r\n@header {\r\npackage com.googlecode.d2j.jasmin;\r\nimport java.util.List;\r\nimport java.util.ArrayList;\r\ni"
},
{
"path": "d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jar2JasminCmd.java",
"chars": 4616,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licens"
},
{
"path": "d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jasmin2JarCmd.java",
"chars": 6092,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licens"
},
{
"path": "d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/JasminDumper.java",
"chars": 34255,
"preview": "/***\r\n * ASM: a very small and fast Java bytecode manipulation framework\r\n * Copyright (c) 2000-2005 INRIA, France Telec"
},
{
"path": "d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jasmins.java",
"chars": 2079,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2014 Panxiaobo\r\n * \r\n * Li"
},
{
"path": "d2j-jasmin/src/test/java/com/googlecode/d2j/tools/jar/test/Jasmin2jTest.java",
"chars": 3582,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2015 Panxiaobo\n * \n * Licens"
},
{
"path": "d2j-jasmin/src/test/resources/jasmins/type.j",
"chars": 942,
"preview": ".class public 'public'\n.implements A\n.implements interface\n.implements public\n\n.annotation visible Ljava/lang/A;\n.annota"
},
{
"path": "d2j-smali/build.gradle",
"chars": 485,
"preview": "apply plugin: 'antlr'\n\ndependencies {\n compile 'org.antlr:antlr4-runtime:4.5'\n compile project(':dex-reader')\n antlr "
},
{
"path": "d2j-smali/src/main/antlr4/com/googlecode/d2j/smali/antlr4/Smali.g4",
"chars": 11453,
"preview": "grammar Smali;\n\nfragment\nINT_NENT: ('+'|'-')? (\n '0'\n | ('1'..'9') ('0'..'9')*\n | '0"
},
{
"path": "d2j-smali/src/main/java/com/googlecode/d2j/smali/AntlrSmaliUtil.java",
"chars": 31272,
"preview": "package com.googlecode.d2j.smali;\n\nimport com.googlecode.d2j.*;\nimport com.googlecode.d2j.reader.Op;\nimport com.googleco"
},
{
"path": "d2j-smali/src/main/java/com/googlecode/d2j/smali/Baksmali.java",
"chars": 3112,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliCmd.java",
"chars": 2544,
"preview": "package com.googlecode.d2j.smali;\n\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nimport c"
},
{
"path": "d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliCodeDumper.java",
"chars": 19860,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2014 Panxiaobo\r\n *\r\n * Lic"
},
{
"path": "d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliDexFileVisitor.java",
"chars": 2326,
"preview": "package com.googlecode.d2j.smali;\r\n\r\nimport com.googlecode.d2j.node.DexClassNode;\r\nimport com.googlecode.d2j.visitors.De"
},
{
"path": "d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliDumpOut.java",
"chars": 2027,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2014 Panxiaobo\r\n *\r\n * Lic"
},
{
"path": "d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliDumper.java",
"chars": 20193,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2014 Panxiaobo\r\n *\r\n * Lic"
},
{
"path": "d2j-smali/src/main/java/com/googlecode/d2j/smali/Smali.java",
"chars": 4370,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "d2j-smali/src/main/java/com/googlecode/d2j/smali/SmaliCmd.java",
"chars": 3162,
"preview": "package com.googlecode.d2j.smali;\n\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nimport c"
},
{
"path": "d2j-smali/src/main/java/com/googlecode/d2j/smali/SmaliCodeVisitor.java",
"chars": 8373,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "d2j-smali/src/main/java/com/googlecode/d2j/smali/Utils.java",
"chars": 16430,
"preview": "package com.googlecode.d2j.smali;\n\nimport com.googlecode.d2j.DexConstants;\nimport com.googlecode.d2j.Field;\nimport com.g"
},
{
"path": "d2j-smali/src/test/java/a/BaksmaliTest.java",
"chars": 1445,
"preview": "package a;\n\nimport com.googlecode.d2j.smali.Baksmali;\nimport com.googlecode.d2j.smali.BaksmaliDexFileVisitor;\nimport com"
},
{
"path": "d2j-smali/src/test/java/a/SmaliTest.java",
"chars": 4986,
"preview": "package a;\n\nimport com.googlecode.d2j.dex.writer.DexFileWriter;\nimport com.googlecode.d2j.node.DexClassNode;\nimport com."
},
{
"path": "d2j-smali/src/test/resources/a.smali",
"chars": 1883,
"preview": ".class public La;\n.super Ljava/lang/Object;\n.implements Lj; .implements Lq; \n.source \"aaa\"\n.source \"aa\\u1234a\"\n\n.field p"
},
{
"path": "dex-ir/build.gradle",
"chars": 87,
"preview": "description = 'Dex Translator'\n\ndependencies {\n compile project(':dex-reader-api')\n}\n\n"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ET.java",
"chars": 1109,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/IrMethod.java",
"chars": 3387,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/LabelAndLocalMapper.java",
"chars": 874,
"preview": "package com.googlecode.dex2jar.ir;\r\n\r\nimport com.googlecode.dex2jar.ir.expr.Local;\r\nimport com.googlecode.dex2jar.ir.stm"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/LocalVar.java",
"chars": 922,
"preview": "package com.googlecode.dex2jar.ir;\r\n\r\nimport com.googlecode.dex2jar.ir.expr.Local;\r\nimport com.googlecode.dex2jar.ir.stm"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/StmtSearcher.java",
"chars": 1376,
"preview": "package com.googlecode.dex2jar.ir;\r\n\r\nimport com.googlecode.dex2jar.ir.expr.Value;\r\nimport com.googlecode.dex2jar.ir.stm"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/StmtTraveler.java",
"chars": 1860,
"preview": "package com.googlecode.dex2jar.ir;\r\n\r\nimport com.googlecode.dex2jar.ir.expr.Value;\r\nimport com.googlecode.dex2jar.ir.stm"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/TransformerException.java",
"chars": 488,
"preview": "package com.googlecode.dex2jar.ir;\n\npublic class TransformerException extends RuntimeException {\n\n /**\n * \n *"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/Trap.java",
"chars": 2092,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/TypeClass.java",
"chars": 4903,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2014 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/Util.java",
"chars": 4660,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/AbstractInvokeExpr.java",
"chars": 1045,
"preview": "/*\r\n * Copyright (c) 2009-2017 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/ArrayExpr.java",
"chars": 1637,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/BinopExpr.java",
"chars": 2004,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/CastExpr.java",
"chars": 1658,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/Constant.java",
"chars": 2746,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/Exprs.java",
"chars": 10363,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/FieldExpr.java",
"chars": 1948,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/FilledArrayExpr.java",
"chars": 1898,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/InvokeCustomExpr.java",
"chars": 2015,
"preview": "/*\r\n * Copyright (c) 2009-2017 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/InvokeExpr.java",
"chars": 3595,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/InvokePolymorphicExpr.java",
"chars": 2309,
"preview": "/*\r\n * Copyright (c) 2009-2017 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/Local.java",
"chars": 2015,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/NewExpr.java",
"chars": 1505,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2013 Panxiaobo\r\n * \r\n * Li"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/NewMutiArrayExpr.java",
"chars": 2378,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/PhiExpr.java",
"chars": 1518,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/RefExpr.java",
"chars": 1936,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/StaticFieldExpr.java",
"chars": 2033,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Li"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/TypeExpr.java",
"chars": 2582,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/UnopExpr.java",
"chars": 1903,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/expr/Value.java",
"chars": 7212,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/AssignStmt.java",
"chars": 1702,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/BaseSwitchStmt.java",
"chars": 1162,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/GotoStmt.java",
"chars": 1546,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/IfStmt.java",
"chars": 1776,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/JumpStmt.java",
"chars": 814,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/LabelStmt.java",
"chars": 2135,
"preview": "/*\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you ma"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/LookupSwitchStmt.java",
"chars": 2336,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/NopStmt.java",
"chars": 1205,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/ReturnVoidStmt.java",
"chars": 1253,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/Stmt.java",
"chars": 6269,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/StmtList.java",
"chars": 7011,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/Stmts.java",
"chars": 2644,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/TableSwitchStmt.java",
"chars": 2232,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/UnopStmt.java",
"chars": 1502,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/stmt/VoidInvokeStmt.java",
"chars": 1413,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Li"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/AggTransformer.java",
"chars": 11321,
"preview": "package com.googlecode.dex2jar.ir.ts;\r\n\r\nimport com.googlecode.dex2jar.ir.IrMethod;\r\nimport com.googlecode.dex2jar.ir.ex"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/Cfg.java",
"chars": 14101,
"preview": "/*\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you ma"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/CleanLabel.java",
"chars": 3120,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/ConstTransformer.java",
"chars": 7005,
"preview": "/*\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you ma"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/DeadCodeTransformer.java",
"chars": 5443,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/EndRemover.java",
"chars": 3664,
"preview": "package com.googlecode.dex2jar.ir.ts;\r\n\r\nimport com.googlecode.dex2jar.ir.IrMethod;\r\nimport com.googlecode.dex2jar.ir.La"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/ExceptionHandlerTrim.java",
"chars": 3345,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/FixVar.java",
"chars": 2224,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Li"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/Ir2JRegAssignTransformer.java",
"chars": 10860,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/JimpleTransformer.java",
"chars": 4864,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/MultiArrayTransformer.java",
"chars": 6840,
"preview": "package com.googlecode.dex2jar.ir.ts;\n\nimport com.googlecode.d2j.DexType;\nimport com.googlecode.dex2jar.ir.IrMethod;\nimp"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/NewTransformer.java",
"chars": 14442,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2013 Panxiaobo\r\n *\r\n * Lic"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/NpeTransformer.java",
"chars": 10823,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2014 Panxiaobo\n *\n * License"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/RemoveConstantFromSSA.java",
"chars": 5489,
"preview": "package com.googlecode.dex2jar.ir.ts;\n\nimport java.util.*;\n\nimport com.googlecode.dex2jar.ir.IrMethod;\nimport com.google"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/RemoveLocalFromSSA.java",
"chars": 11082,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2013 Panxiaobo\r\n *\r\n * Lic"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/SSATransformer.java",
"chars": 15344,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/StatedTransformer.java",
"chars": 337,
"preview": "package com.googlecode.dex2jar.ir.ts;\r\n\r\nimport com.googlecode.dex2jar.ir.IrMethod;\r\n\r\npublic abstract class StatedTrans"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/Transformer.java",
"chars": 898,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/TypeTransformer.java",
"chars": 39269,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2014 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/UnSSATransformer.java",
"chars": 22630,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/UniqueQueue.java",
"chars": 847,
"preview": "package com.googlecode.dex2jar.ir.ts;\n\nimport java.util.Collection;\nimport java.util.HashSet;\nimport java.util.LinkedLis"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/VoidInvokeTransformer.java",
"chars": 2440,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2014 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/ZeroTransformer.java",
"chars": 4168,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2014 Panxiaobo\r\n *\r\n * Lic"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/an/AnalyzeValue.java",
"chars": 775,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/an/BaseAnalyze.java",
"chars": 5488,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/an/SimpleLiveAnalyze.java",
"chars": 4381,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/an/SimpleLiveValue.java",
"chars": 991,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/array/ArrayElementTransformer.java",
"chars": 17035,
"preview": "package com.googlecode.dex2jar.ir.ts.array;\r\n\r\n\r\nimport com.googlecode.dex2jar.ir.IrMethod;\r\nimport com.googlecode.dex2j"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/array/ArrayNullPointerTransformer.java",
"chars": 7013,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/array/FillArrayTransformer.java",
"chars": 23236,
"preview": "package com.googlecode.dex2jar.ir.ts.array;\r\n\r\nimport com.googlecode.dex2jar.ir.IrMethod;\r\nimport com.googlecode.dex2jar"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/AggTransformerTest.java",
"chars": 3016,
"preview": "package com.googlecode.dex2jar.ir.test;\n\nimport static com.googlecode.dex2jar.ir.expr.Exprs.*;\nimport static com.googlec"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/BaseTransformerTest.java",
"chars": 2739,
"preview": "package com.googlecode.dex2jar.ir.test;\n\nimport java.lang.reflect.ParameterizedType;\nimport java.util.ArrayList;\nimport "
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/ConstTransformerTest.java",
"chars": 3953,
"preview": "package com.googlecode.dex2jar.ir.test;\n\nimport static com.googlecode.dex2jar.ir.expr.Exprs.nLocal;\nimport static com.go"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/ConstantStringTest.java",
"chars": 311,
"preview": "package com.googlecode.dex2jar.ir.test;\n\n\nimport com.googlecode.dex2jar.ir.expr.Exprs;\nimport org.junit.Assert;\nimport o"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/DeadCodeTrnasformerTest.java",
"chars": 637,
"preview": "package com.googlecode.dex2jar.ir.test;\n\nimport com.googlecode.dex2jar.ir.stmt.Stmt;\nimport com.googlecode.dex2jar.ir.st"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/JimpleTransformerTest.java",
"chars": 1695,
"preview": "package com.googlecode.dex2jar.ir.test;\n\nimport static com.googlecode.dex2jar.ir.expr.Exprs.nAdd;\nimport static com.goog"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/RemoveConstantFromSSATest.java",
"chars": 3511,
"preview": "package com.googlecode.dex2jar.ir.test;\n\nimport com.googlecode.dex2jar.ir.IrMethod;\nimport com.googlecode.dex2jar.ir.exp"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/RemoveLocalFromSSATest.java",
"chars": 941,
"preview": "package com.googlecode.dex2jar.ir.test;\n\nimport com.googlecode.dex2jar.ir.expr.Local;\nimport com.googlecode.dex2jar.ir.s"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/SSATransformerTest.java",
"chars": 8773,
"preview": "package com.googlecode.dex2jar.ir.test;\r\n\r\nimport static com.googlecode.dex2jar.ir.expr.Exprs.*;\r\nimport static com.goog"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/StmtListTest.java",
"chars": 1299,
"preview": "package com.googlecode.dex2jar.ir.test;\n\nimport static com.googlecode.dex2jar.ir.expr.Exprs.nCast;\nimport static com.goo"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/TypeTransformerTest.java",
"chars": 5372,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n *\n * License"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/UnSSATransformerTransformerTest.java",
"chars": 6468,
"preview": "package com.googlecode.dex2jar.ir.test;\n\nimport static com.googlecode.dex2jar.ir.expr.Exprs.*;\nimport static com.googlec"
},
{
"path": "dex-ir/src/test/java/com/googlecode/dex2jar/ir/test/ZeroTransformerTest.java",
"chars": 1495,
"preview": "package com.googlecode.dex2jar.ir.test;\n\nimport com.googlecode.dex2jar.ir.expr.Local;\nimport com.googlecode.dex2jar.ir.e"
},
{
"path": "dex-reader/build.gradle",
"chars": 175,
"preview": "description = 'Dex Reader'\n\ndependencies {\n compile project(':dex-reader-api')\n testCompile (group: 'org.apache.co"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/reader/BaseDexFileReader.java",
"chars": 361,
"preview": "package com.googlecode.d2j.reader;\n\nimport com.googlecode.d2j.visitors.DexFileVisitor;\n\nimport java.util.List;\n\npublic i"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java",
"chars": 70836,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/reader/MultiDexFileReader.java",
"chars": 4337,
"preview": "package com.googlecode.d2j.reader;\n\nimport com.googlecode.d2j.DexConstants;\nimport com.googlecode.d2j.util.zip.AccessBuf"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/reader/zip/ZipUtil.java",
"chars": 3081,
"preview": "/*\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you ma"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/ASMifierAnnotationV.java",
"chars": 2712,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/ASMifierClassV.java",
"chars": 6707,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/ASMifierCodeV.java",
"chars": 7549,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/ASMifierFileV.java",
"chars": 4480,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/ArrayOut.java",
"chars": 1269,
"preview": "/*\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you ma"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/Escape.java",
"chars": 11821,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/Mutf8.java",
"chars": 4118,
"preview": "/*\n * Copyright (C) 2011 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/Out.java",
"chars": 159,
"preview": "package com.googlecode.d2j.util;\n\npublic interface Out {\n void push();\n\n void s(String s);\n\n void s(String form"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/Utf8Utils.java",
"chars": 9500,
"preview": "/*\n * Copyright (C) 2007 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/zip/AccessBufByteArrayOutputStream.java",
"chars": 210,
"preview": "package com.googlecode.d2j.util.zip;\n\nimport java.io.ByteArrayOutputStream;\n\npublic class AccessBufByteArrayOutputStream"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/zip/AutoSTOREDZipOutputStream.java",
"chars": 3062,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2014 Panxiaobo\n *\n * License"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/zip/ZipConstants.java",
"chars": 1683,
"preview": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NO"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/zip/ZipEntry.java",
"chars": 7706,
"preview": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NO"
},
{
"path": "dex-reader/src/main/java/com/googlecode/d2j/util/zip/ZipFile.java",
"chars": 12579,
"preview": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NO"
},
{
"path": "dex-reader/src/test/java/com/googlecode/d2j/reader/test/AsmfierTest.java",
"chars": 2204,
"preview": "/*\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you ma"
},
{
"path": "dex-reader/src/test/java/com/googlecode/d2j/reader/test/BadZipEntryFlagTest.java",
"chars": 1853,
"preview": "package com.googlecode.d2j.reader.test;\n\nimport java.io.IOException;\nimport java.util.zip.ZipEntry;\nimport java.util.zip"
},
{
"path": "dex-reader/src/test/java/com/googlecode/d2j/reader/test/SkipDupMethod.java",
"chars": 794,
"preview": "package com.googlecode.d2j.reader.test;\n\n\nimport com.googlecode.d2j.node.DexFileNode;\nimport com.googlecode.d2j.reader.D"
},
{
"path": "dex-reader-api/build.gradle",
"chars": 31,
"preview": "description = 'Dex Reader API'\n"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/DexConstants.java",
"chars": 2470,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/DexException.java",
"chars": 1932,
"preview": "/*\n * Copyright (c) 2009-2012 Panxiaobo\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you ma"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/DexLabel.java",
"chars": 1373,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/DexType.java",
"chars": 1039,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/Field.java",
"chars": 1788,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/Method.java",
"chars": 3018,
"preview": "/*\r\n * Copyright (c) 2009-2012 Panxiaobo\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * yo"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/MethodHandle.java",
"chars": 2414,
"preview": "/*\n * Copyright (c) 2009-2017 Panxiaobo\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/Proto.java",
"chars": 2427,
"preview": "/*\n * Copyright (c) 2009-2017 Panxiaobo\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/Visibility.java",
"chars": 1046,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/DexAnnotationNode.java",
"chars": 5010,
"preview": "/*\r\n * dex2jar - Tools to work with android .dex and java .class files\r\n * Copyright (c) 2009-2013 Panxiaobo\r\n * \r\n * Li"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/DexClassNode.java",
"chars": 3889,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/DexCodeNode.java",
"chars": 5470,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/DexDebugNode.java",
"chars": 5660,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2014 Panxiaobo\n *\n * License"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/DexFieldNode.java",
"chars": 2286,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/DexFileNode.java",
"chars": 1742,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n *\n * License"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/DexMethodNode.java",
"chars": 3943,
"preview": "/*\n * dex2jar - Tools to work with android .dex and java .class files\n * Copyright (c) 2009-2013 Panxiaobo\n * \n * Licens"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/TryCatchNode.java",
"chars": 598,
"preview": "package com.googlecode.d2j.node;\n\nimport com.googlecode.d2j.DexLabel;\nimport com.googlecode.d2j.visitors.DexCodeVisitor;"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/analysis/DvmFrame.java",
"chars": 14108,
"preview": "package com.googlecode.d2j.node.analysis;\r\n\r\nimport com.googlecode.d2j.MethodHandle;\r\nimport com.googlecode.d2j.Proto;\r\n"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/analysis/DvmInterpreter.java",
"chars": 1249,
"preview": "package com.googlecode.d2j.node.analysis;\r\n\r\nimport com.googlecode.d2j.node.insn.DexStmtNode;\r\n\r\nimport java.util.List;\r"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/AbstractMethodStmtNode.java",
"chars": 957,
"preview": "/*\n * Copyright (c) 2009-2017 Panxiaobo\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/BaseSwitchStmtNode.java",
"chars": 383,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.DexLabel;\nimport com.googlecode.d2j.reader.Op;\n\npublic "
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/ConstStmtNode.java",
"chars": 470,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.reader.Op;\nimport com.googlecode.d2j.visitors.DexCodeVi"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/DexLabelStmtNode.java",
"chars": 405,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.DexLabel;\nimport com.googlecode.d2j.visitors.DexCodeVis"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/DexStmtNode.java",
"chars": 333,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.reader.Op;\nimport com.googlecode.d2j.visitors.DexCodeVi"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/FieldStmtNode.java",
"chars": 555,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.Field;\nimport com.googlecode.d2j.reader.Op;\nimport com."
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/FillArrayDataStmtNode.java",
"chars": 499,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.reader.Op;\nimport com.googlecode.d2j.visitors.DexCodeVi"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/FilledNewArrayStmtNode.java",
"chars": 511,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.reader.Op;\nimport com.googlecode.d2j.visitors.DexCodeVi"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/JumpStmtNode.java",
"chars": 560,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.DexLabel;\nimport com.googlecode.d2j.reader.Op;\nimport c"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/MethodCustomStmtNode.java",
"chars": 1463,
"preview": "/*\n * Copyright (c) 2009-2017 Panxiaobo\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/MethodPolymorphicStmtNode.java",
"chars": 1301,
"preview": "/*\n * Copyright (c) 2009-2017 Panxiaobo\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/MethodStmtNode.java",
"chars": 1213,
"preview": "/*\n * Copyright (c) 2009-2017 Panxiaobo\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/PackedSwitchStmtNode.java",
"chars": 546,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.DexLabel;\nimport com.googlecode.d2j.reader.Op;\nimport c"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/SparseSwitchStmtNode.java",
"chars": 526,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.DexLabel;\nimport com.googlecode.d2j.reader.Op;\nimport c"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/Stmt0RNode.java",
"chars": 324,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.reader.Op;\nimport com.googlecode.d2j.visitors.DexCodeVi"
},
{
"path": "dex-reader-api/src/main/java/com/googlecode/d2j/node/insn/Stmt1RNode.java",
"chars": 381,
"preview": "package com.googlecode.d2j.node.insn;\n\nimport com.googlecode.d2j.reader.Op;\nimport com.googlecode.d2j.visitors.DexCodeVi"
}
]
// ... and 203 more files (download for full content)
About this extraction
This page contains the full source code of the DexPatcher/dex2jar GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 403 files (2.2 MB), approximately 603.3k tokens, and a symbol index with 2698 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.