├── .classpath ├── .gitattributes ├── .gitignore ├── .project ├── .settings └── org.eclipse.jdt.core.prefs ├── AndroidManifest.xml ├── LICENSE ├── README.md ├── XposedBridgeApi-54.jar ├── assets └── xposed_init ├── ic_launcher-web.png ├── lib ├── .gitignore └── full_framework_15.jar ├── libs ├── android-support-v4.jar ├── antlr-3.5.2-complete.jar ├── armeabi │ ├── libdvmnative.so │ └── libluajava.so ├── commons-cli-1.2.jar └── guava-17.0.jar ├── lint.xml ├── proguard-project.txt ├── project.properties ├── res ├── drawable-hdpi │ ├── ic_launcher.png │ └── logo.png ├── drawable-mdpi │ └── ic_launcher.png ├── drawable-xhdpi │ └── ic_launcher.png ├── drawable-xxhdpi │ └── ic_launcher.png ├── layout │ └── activity_main.xml ├── menu │ └── main.xml ├── values-sw600dp │ └── dimens.xml ├── values-sw720dp-land │ └── dimens.xml ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml └── src ├── com └── android │ └── reverse │ ├── apimonitor │ ├── AbstractBahaviorHookCallBack.java │ ├── AccountManagerHook.java │ ├── ActivityManagerHook.java │ ├── ActivityThreadHook.java │ ├── AlarmManagerHook.java │ ├── ApiMonitorHook.java │ ├── ApiMonitorHookManager.java │ ├── AudioRecordHook.java │ ├── CameraHook.java │ ├── ConnectivityManagerHook.java │ ├── ContentResolverHook.java │ ├── ContextImplHook.java │ ├── MediaRecorderHook.java │ ├── NetWorkHook.java │ ├── NotificationManagerHook.java │ ├── PackageManagerHook.java │ ├── ProcessBuilderHook.java │ ├── RuntimeHook.java │ ├── SmsManagerHook.java │ └── TelephonyManagerHook.java │ ├── client │ └── MainActivity.java │ ├── collecter │ ├── DexFileInfo.java │ ├── DexFileInfoCollecter.java │ ├── HeapDump.java │ ├── LuaScriptInvoker.java │ ├── MemDump.java │ ├── ModuleContext.java │ └── NativeHookCollecter.java │ ├── hook │ ├── HookHelperFacktory.java │ ├── HookHelperInterface.java │ ├── HookParam.java │ ├── MethodHookCallBack.java │ └── XposeHookHelperImpl.java │ ├── mod │ ├── CommandBroadcastReceiver.java │ ├── PackageMetaInfo.java │ └── ReverseXposedModule.java │ ├── request │ ├── BackSmaliCommandHandler.java │ ├── CommandHandler.java │ ├── CommandHandlerParser.java │ ├── DumpClassCommandHandler.java │ ├── DumpDexFileCommandHandler.java │ ├── DumpDexInfoCommandHandler.java │ ├── DumpHeapCommandHandler.java │ ├── DumpMemCommandHandler.java │ ├── InvokeScriptCommandHandler.java │ └── NativeHookInfoHandler.java │ ├── smali │ ├── DexFileBuilder.java │ ├── DexFileHeadersPointer.java │ └── MemoryBackSmali.java │ └── util │ ├── Constant.java │ ├── JsonWriter.java │ ├── Logger.java │ ├── NativeFunction.java │ ├── RefInvoke.java │ └── Utility.java ├── ds └── tree │ ├── DuplicateKeyException.java │ ├── RadixTree.java │ ├── RadixTreeImpl.java │ ├── RadixTreeNode.java │ ├── Visitor.java │ └── VisitorImpl.java ├── javax └── annotation │ ├── CheckForNull.java │ ├── CheckForSigned.java │ ├── CheckReturnValue.java │ ├── Detainted.java │ ├── MatchesPattern.java │ ├── Nonnegative.java │ ├── Nonnull.java │ ├── Nullable.java │ ├── OverridingMethodsMustInvokeSuper.java │ ├── ParametersAreNonnullByDefault.java │ ├── ParametersAreNullableByDefault.java │ ├── PropertyKey.java │ ├── RegEx.java │ ├── Signed.java │ ├── Syntax.java │ ├── Tainted.java │ ├── Untainted.java │ ├── WillClose.java │ ├── WillCloseWhenClosed.java │ ├── WillNotClose.java │ ├── concurrent │ ├── GuardedBy.java │ ├── Immutable.java │ ├── NotThreadSafe.java │ └── ThreadSafe.java │ └── meta │ ├── Exclusive.java │ ├── Exhaustive.java │ ├── TypeQualifier.java │ ├── TypeQualifierDefault.java │ ├── TypeQualifierNickname.java │ ├── TypeQualifierValidator.java │ └── When.java └── org ├── jf ├── baksmali │ ├── Adaptors │ │ ├── AnnotationFormatter.java │ │ ├── BlankMethodItem.java │ │ ├── CatchMethodItem.java │ │ ├── ClassDefinition.java │ │ ├── CommentMethodItem.java │ │ ├── CommentedOutMethodItem.java │ │ ├── CommentingIndentingWriter.java │ │ ├── Debug │ │ │ ├── BeginEpilogueMethodItem.java │ │ │ ├── DebugMethodItem.java │ │ │ ├── EndLocalMethodItem.java │ │ │ ├── EndPrologueMethodItem.java │ │ │ ├── LineNumberMethodItem.java │ │ │ ├── LocalFormatter.java │ │ │ ├── RestartLocalMethodItem.java │ │ │ ├── SetSourceFileMethodItem.java │ │ │ └── StartLocalMethodItem.java │ │ ├── EncodedValue │ │ │ ├── AnnotationEncodedValueAdaptor.java │ │ │ ├── ArrayEncodedValueAdaptor.java │ │ │ └── EncodedValueAdaptor.java │ │ ├── EndTryLabelMethodItem.java │ │ ├── FieldDefinition.java │ │ ├── Format │ │ │ ├── ArrayDataMethodItem.java │ │ │ ├── InstructionMethodItem.java │ │ │ ├── InstructionMethodItemFactory.java │ │ │ ├── OffsetInstructionFormatMethodItem.java │ │ │ ├── PackedSwitchMethodItem.java │ │ │ ├── SparseSwitchMethodItem.java │ │ │ └── UnresolvedOdexInstructionMethodItem.java │ │ ├── LabelMethodItem.java │ │ ├── MethodDefinition.java │ │ ├── MethodItem.java │ │ ├── PostInstructionRegisterInfoMethodItem.java │ │ ├── PreInstructionRegisterInfoMethodItem.java │ │ ├── ReferenceFormatter.java │ │ ├── RegisterFormatter.java │ │ └── SyntheticAccessCommentMethodItem.java │ ├── Renderers │ │ ├── BooleanRenderer.java │ │ ├── ByteRenderer.java │ │ ├── CharRenderer.java │ │ ├── DoubleRenderer.java │ │ ├── FloatRenderer.java │ │ ├── IntegerRenderer.java │ │ ├── LongRenderer.java │ │ └── ShortRenderer.java │ ├── baksmali.java │ ├── baksmaliOptions.java │ ├── dump.java │ └── main.java ├── dexlib2 │ ├── AccessFlags.java │ ├── AnnotationVisibility.java │ ├── DebugItemType.java │ ├── DexFileFactory.java │ ├── Format.java │ ├── Opcode.java │ ├── Opcodes.java │ ├── ReferenceType.java │ ├── ValueType.java │ ├── VerificationError.java │ ├── analysis │ │ ├── AnalysisException.java │ │ ├── AnalyzedInstruction.java │ │ ├── ArrayProto.java │ │ ├── ClassPath.java │ │ ├── ClassProto.java │ │ ├── CustomInlineMethodResolver.java │ │ ├── DumpFields.java │ │ ├── DumpVtables.java │ │ ├── InlineMethodResolver.java │ │ ├── MethodAnalyzer.java │ │ ├── OdexedFieldInstructionMapper.java │ │ ├── PrimitiveProto.java │ │ ├── RegisterType.java │ │ ├── TypeProto.java │ │ ├── UnknownClassProto.java │ │ ├── UnresolvedClassException.java │ │ ├── UnresolvedOdexInstruction.java │ │ ├── reflection │ │ │ ├── ReflectionClassDef.java │ │ │ ├── ReflectionConstructor.java │ │ │ ├── ReflectionField.java │ │ │ ├── ReflectionMethod.java │ │ │ └── util │ │ │ │ └── ReflectionUtils.java │ │ └── util │ │ │ └── TypeProtoUtils.java │ ├── base │ │ ├── BaseAnnotation.java │ │ ├── BaseAnnotationElement.java │ │ ├── BaseExceptionHandler.java │ │ ├── BaseMethodParameter.java │ │ ├── BaseTryBlock.java │ │ ├── reference │ │ │ ├── BaseFieldReference.java │ │ │ ├── BaseMethodReference.java │ │ │ ├── BaseStringReference.java │ │ │ └── BaseTypeReference.java │ │ └── value │ │ │ ├── BaseAnnotationEncodedValue.java │ │ │ ├── BaseArrayEncodedValue.java │ │ │ ├── BaseBooleanEncodedValue.java │ │ │ ├── BaseByteEncodedValue.java │ │ │ ├── BaseCharEncodedValue.java │ │ │ ├── BaseDoubleEncodedValue.java │ │ │ ├── BaseEnumEncodedValue.java │ │ │ ├── BaseFieldEncodedValue.java │ │ │ ├── BaseFloatEncodedValue.java │ │ │ ├── BaseIntEncodedValue.java │ │ │ ├── BaseLongEncodedValue.java │ │ │ ├── BaseMethodEncodedValue.java │ │ │ ├── BaseNullEncodedValue.java │ │ │ ├── BaseShortEncodedValue.java │ │ │ ├── BaseStringEncodedValue.java │ │ │ └── BaseTypeEncodedValue.java │ ├── builder │ │ ├── BuilderDebugItem.java │ │ ├── BuilderExceptionHandler.java │ │ ├── BuilderInstruction.java │ │ ├── BuilderOffsetInstruction.java │ │ ├── BuilderSwitchPayload.java │ │ ├── BuilderTryBlock.java │ │ ├── Label.java │ │ ├── MethodImplementationBuilder.java │ │ ├── MethodLocation.java │ │ ├── MutableMethodImplementation.java │ │ ├── SwitchLabelElement.java │ │ ├── debug │ │ │ ├── BuilderEndLocal.java │ │ │ ├── BuilderEpilogueBegin.java │ │ │ ├── BuilderLineNumber.java │ │ │ ├── BuilderPrologueEnd.java │ │ │ ├── BuilderRestartLocal.java │ │ │ ├── BuilderSetSourceFile.java │ │ │ └── BuilderStartLocal.java │ │ └── instruction │ │ │ ├── BuilderArrayPayload.java │ │ │ ├── BuilderInstruction10t.java │ │ │ ├── BuilderInstruction10x.java │ │ │ ├── BuilderInstruction11n.java │ │ │ ├── BuilderInstruction11x.java │ │ │ ├── BuilderInstruction12x.java │ │ │ ├── BuilderInstruction20bc.java │ │ │ ├── BuilderInstruction20t.java │ │ │ ├── BuilderInstruction21c.java │ │ │ ├── BuilderInstruction21ih.java │ │ │ ├── BuilderInstruction21lh.java │ │ │ ├── BuilderInstruction21s.java │ │ │ ├── BuilderInstruction21t.java │ │ │ ├── BuilderInstruction22b.java │ │ │ ├── BuilderInstruction22c.java │ │ │ ├── BuilderInstruction22s.java │ │ │ ├── BuilderInstruction22t.java │ │ │ ├── BuilderInstruction22x.java │ │ │ ├── BuilderInstruction23x.java │ │ │ ├── BuilderInstruction30t.java │ │ │ ├── BuilderInstruction31c.java │ │ │ ├── BuilderInstruction31i.java │ │ │ ├── BuilderInstruction31t.java │ │ │ ├── BuilderInstruction32x.java │ │ │ ├── BuilderInstruction35c.java │ │ │ ├── BuilderInstruction3rc.java │ │ │ ├── BuilderInstruction51l.java │ │ │ ├── BuilderPackedSwitchPayload.java │ │ │ ├── BuilderSparseSwitchPayload.java │ │ │ └── BuilderSwitchElement.java │ ├── dexbacked │ │ ├── BaseDexBuffer.java │ │ ├── BaseDexReader.java │ │ ├── DexBackedAnnotation.java │ │ ├── DexBackedAnnotationElement.java │ │ ├── DexBackedCatchAllExceptionHandler.java │ │ ├── DexBackedClassDef.java │ │ ├── DexBackedDexFile.java │ │ ├── DexBackedExceptionHandler.java │ │ ├── DexBackedField.java │ │ ├── DexBackedMethod.java │ │ ├── DexBackedMethodImplementation.java │ │ ├── DexBackedOdexFile.java │ │ ├── DexBackedTryBlock.java │ │ ├── DexBackedTypedExceptionHandler.java │ │ ├── DexReader.java │ │ ├── MemoryDexFileItemPointer.java │ │ ├── MemoryReader.java │ │ ├── instruction │ │ │ ├── DexBackedArrayPayload.java │ │ │ ├── DexBackedInstruction.java │ │ │ ├── DexBackedInstruction10t.java │ │ │ ├── DexBackedInstruction10x.java │ │ │ ├── DexBackedInstruction11n.java │ │ │ ├── DexBackedInstruction11x.java │ │ │ ├── DexBackedInstruction12x.java │ │ │ ├── DexBackedInstruction20bc.java │ │ │ ├── DexBackedInstruction20t.java │ │ │ ├── DexBackedInstruction21c.java │ │ │ ├── DexBackedInstruction21ih.java │ │ │ ├── DexBackedInstruction21lh.java │ │ │ ├── DexBackedInstruction21s.java │ │ │ ├── DexBackedInstruction21t.java │ │ │ ├── DexBackedInstruction22b.java │ │ │ ├── DexBackedInstruction22c.java │ │ │ ├── DexBackedInstruction22cs.java │ │ │ ├── DexBackedInstruction22s.java │ │ │ ├── DexBackedInstruction22t.java │ │ │ ├── DexBackedInstruction22x.java │ │ │ ├── DexBackedInstruction23x.java │ │ │ ├── DexBackedInstruction30t.java │ │ │ ├── DexBackedInstruction31c.java │ │ │ ├── DexBackedInstruction31i.java │ │ │ ├── DexBackedInstruction31t.java │ │ │ ├── DexBackedInstruction32x.java │ │ │ ├── DexBackedInstruction35c.java │ │ │ ├── DexBackedInstruction35mi.java │ │ │ ├── DexBackedInstruction35ms.java │ │ │ ├── DexBackedInstruction3rc.java │ │ │ ├── DexBackedInstruction3rmi.java │ │ │ ├── DexBackedInstruction3rms.java │ │ │ ├── DexBackedInstruction51l.java │ │ │ ├── DexBackedPackedSwitchPayload.java │ │ │ ├── DexBackedSparseSwitchPayload.java │ │ │ └── DexBackedUnknownInstruction.java │ │ ├── raw │ │ │ ├── AnnotationDirectoryItem.java │ │ │ ├── AnnotationItem.java │ │ │ ├── AnnotationSetItem.java │ │ │ ├── AnnotationSetRefList.java │ │ │ ├── ClassDataItem.java │ │ │ ├── ClassDefItem.java │ │ │ ├── CodeItem.java │ │ │ ├── DebugInfoItem.java │ │ │ ├── EncodedArrayItem.java │ │ │ ├── EncodedValue.java │ │ │ ├── FieldIdItem.java │ │ │ ├── HeaderItem.java │ │ │ ├── ItemType.java │ │ │ ├── MapItem.java │ │ │ ├── MethodIdItem.java │ │ │ ├── OdexHeaderItem.java │ │ │ ├── ProtoIdItem.java │ │ │ ├── RawDexFile.java │ │ │ ├── SectionAnnotator.java │ │ │ ├── StringDataItem.java │ │ │ ├── StringIdItem.java │ │ │ ├── TypeIdItem.java │ │ │ ├── TypeListItem.java │ │ │ └── util │ │ │ │ └── DexAnnotator.java │ │ ├── reference │ │ │ ├── DexBackedFieldReference.java │ │ │ ├── DexBackedMethodReference.java │ │ │ ├── DexBackedReference.java │ │ │ ├── DexBackedStringReference.java │ │ │ └── DexBackedTypeReference.java │ │ ├── util │ │ │ ├── AnnotationsDirectory.java │ │ │ ├── DebugInfo.java │ │ │ ├── FixedSizeList.java │ │ │ ├── FixedSizeSet.java │ │ │ ├── ParameterIterator.java │ │ │ ├── StaticInitialValueIterator.java │ │ │ ├── VariableSizeCollection.java │ │ │ ├── VariableSizeIterator.java │ │ │ ├── VariableSizeList.java │ │ │ ├── VariableSizeListIterator.java │ │ │ ├── VariableSizeLookaheadIterator.java │ │ │ └── VariableSizeSet.java │ │ └── value │ │ │ ├── DexBackedAnnotationEncodedValue.java │ │ │ ├── DexBackedArrayEncodedValue.java │ │ │ ├── DexBackedEncodedValue.java │ │ │ ├── DexBackedEnumEncodedValue.java │ │ │ ├── DexBackedFieldEncodedValue.java │ │ │ ├── DexBackedMethodEncodedValue.java │ │ │ ├── DexBackedStringEncodedValue.java │ │ │ └── DexBackedTypeEncodedValue.java │ ├── iface │ │ ├── Annotation.java │ │ ├── AnnotationElement.java │ │ ├── BasicAnnotation.java │ │ ├── ClassDef.java │ │ ├── DexFile.java │ │ ├── ExceptionHandler.java │ │ ├── Field.java │ │ ├── Method.java │ │ ├── MethodImplementation.java │ │ ├── MethodParameter.java │ │ ├── TryBlock.java │ │ ├── debug │ │ │ ├── DebugItem.java │ │ │ ├── EndLocal.java │ │ │ ├── EpilogueBegin.java │ │ │ ├── LineNumber.java │ │ │ ├── LocalInfo.java │ │ │ ├── PrologueEnd.java │ │ │ ├── RestartLocal.java │ │ │ ├── SetSourceFile.java │ │ │ └── StartLocal.java │ │ ├── instruction │ │ │ ├── FieldOffsetInstruction.java │ │ │ ├── FiveRegisterInstruction.java │ │ │ ├── HatLiteralInstruction.java │ │ │ ├── InlineIndexInstruction.java │ │ │ ├── Instruction.java │ │ │ ├── LongHatLiteralInstruction.java │ │ │ ├── NarrowHatLiteralInstruction.java │ │ │ ├── NarrowLiteralInstruction.java │ │ │ ├── OffsetInstruction.java │ │ │ ├── OneRegisterInstruction.java │ │ │ ├── PayloadInstruction.java │ │ │ ├── ReferenceInstruction.java │ │ │ ├── RegisterRangeInstruction.java │ │ │ ├── SwitchElement.java │ │ │ ├── SwitchPayload.java │ │ │ ├── ThreeRegisterInstruction.java │ │ │ ├── TwoRegisterInstruction.java │ │ │ ├── VariableRegisterInstruction.java │ │ │ ├── VerificationErrorInstruction.java │ │ │ ├── VtableIndexInstruction.java │ │ │ ├── WideLiteralInstruction.java │ │ │ └── formats │ │ │ │ ├── ArrayPayload.java │ │ │ │ ├── Instruction10t.java │ │ │ │ ├── Instruction10x.java │ │ │ │ ├── Instruction11n.java │ │ │ │ ├── Instruction11x.java │ │ │ │ ├── Instruction12x.java │ │ │ │ ├── Instruction20bc.java │ │ │ │ ├── Instruction20t.java │ │ │ │ ├── Instruction21c.java │ │ │ │ ├── Instruction21ih.java │ │ │ │ ├── Instruction21lh.java │ │ │ │ ├── Instruction21s.java │ │ │ │ ├── Instruction21t.java │ │ │ │ ├── Instruction22b.java │ │ │ │ ├── Instruction22c.java │ │ │ │ ├── Instruction22cs.java │ │ │ │ ├── Instruction22s.java │ │ │ │ ├── Instruction22t.java │ │ │ │ ├── Instruction22x.java │ │ │ │ ├── Instruction23x.java │ │ │ │ ├── Instruction30t.java │ │ │ │ ├── Instruction31c.java │ │ │ │ ├── Instruction31i.java │ │ │ │ ├── Instruction31t.java │ │ │ │ ├── Instruction32x.java │ │ │ │ ├── Instruction35c.java │ │ │ │ ├── Instruction35mi.java │ │ │ │ ├── Instruction35ms.java │ │ │ │ ├── Instruction3rc.java │ │ │ │ ├── Instruction3rmi.java │ │ │ │ ├── Instruction3rms.java │ │ │ │ ├── Instruction51l.java │ │ │ │ ├── PackedSwitchPayload.java │ │ │ │ ├── SparseSwitchPayload.java │ │ │ │ └── UnknownInstruction.java │ │ ├── reference │ │ │ ├── FieldReference.java │ │ │ ├── MethodReference.java │ │ │ ├── Reference.java │ │ │ ├── StringReference.java │ │ │ └── TypeReference.java │ │ └── value │ │ │ ├── AnnotationEncodedValue.java │ │ │ ├── ArrayEncodedValue.java │ │ │ ├── BooleanEncodedValue.java │ │ │ ├── ByteEncodedValue.java │ │ │ ├── CharEncodedValue.java │ │ │ ├── DoubleEncodedValue.java │ │ │ ├── EncodedValue.java │ │ │ ├── EnumEncodedValue.java │ │ │ ├── FieldEncodedValue.java │ │ │ ├── FloatEncodedValue.java │ │ │ ├── IntEncodedValue.java │ │ │ ├── LongEncodedValue.java │ │ │ ├── MethodEncodedValue.java │ │ │ ├── NullEncodedValue.java │ │ │ ├── ShortEncodedValue.java │ │ │ ├── StringEncodedValue.java │ │ │ └── TypeEncodedValue.java │ ├── immutable │ │ ├── ImmutableAnnotation.java │ │ ├── ImmutableAnnotationElement.java │ │ ├── ImmutableClassDef.java │ │ ├── ImmutableDexFile.java │ │ ├── ImmutableExceptionHandler.java │ │ ├── ImmutableField.java │ │ ├── ImmutableMethod.java │ │ ├── ImmutableMethodImplementation.java │ │ ├── ImmutableMethodParameter.java │ │ ├── ImmutableTryBlock.java │ │ ├── debug │ │ │ ├── ImmutableDebugItem.java │ │ │ ├── ImmutableEndLocal.java │ │ │ ├── ImmutableEpilogueBegin.java │ │ │ ├── ImmutableLineNumber.java │ │ │ ├── ImmutablePrologueEnd.java │ │ │ ├── ImmutableRestartLocal.java │ │ │ ├── ImmutableSetSourceFile.java │ │ │ └── ImmutableStartLocal.java │ │ ├── instruction │ │ │ ├── ImmutableArrayPayload.java │ │ │ ├── ImmutableInstruction.java │ │ │ ├── ImmutableInstruction10t.java │ │ │ ├── ImmutableInstruction10x.java │ │ │ ├── ImmutableInstruction11n.java │ │ │ ├── ImmutableInstruction11x.java │ │ │ ├── ImmutableInstruction12x.java │ │ │ ├── ImmutableInstruction20bc.java │ │ │ ├── ImmutableInstruction20t.java │ │ │ ├── ImmutableInstruction21c.java │ │ │ ├── ImmutableInstruction21ih.java │ │ │ ├── ImmutableInstruction21lh.java │ │ │ ├── ImmutableInstruction21s.java │ │ │ ├── ImmutableInstruction21t.java │ │ │ ├── ImmutableInstruction22b.java │ │ │ ├── ImmutableInstruction22c.java │ │ │ ├── ImmutableInstruction22cs.java │ │ │ ├── ImmutableInstruction22s.java │ │ │ ├── ImmutableInstruction22t.java │ │ │ ├── ImmutableInstruction22x.java │ │ │ ├── ImmutableInstruction23x.java │ │ │ ├── ImmutableInstruction30t.java │ │ │ ├── ImmutableInstruction31c.java │ │ │ ├── ImmutableInstruction31i.java │ │ │ ├── ImmutableInstruction31t.java │ │ │ ├── ImmutableInstruction32x.java │ │ │ ├── ImmutableInstruction35c.java │ │ │ ├── ImmutableInstruction35mi.java │ │ │ ├── ImmutableInstruction35ms.java │ │ │ ├── ImmutableInstruction3rc.java │ │ │ ├── ImmutableInstruction3rmi.java │ │ │ ├── ImmutableInstruction3rms.java │ │ │ ├── ImmutableInstruction51l.java │ │ │ ├── ImmutableInstructionFactory.java │ │ │ ├── ImmutablePackedSwitchPayload.java │ │ │ ├── ImmutableSparseSwitchPayload.java │ │ │ ├── ImmutableSwitchElement.java │ │ │ └── ImmutableUnknownInstruction.java │ │ ├── reference │ │ │ ├── ImmutableFieldReference.java │ │ │ ├── ImmutableMethodReference.java │ │ │ ├── ImmutableReference.java │ │ │ ├── ImmutableReferenceFactory.java │ │ │ ├── ImmutableStringReference.java │ │ │ └── ImmutableTypeReference.java │ │ ├── util │ │ │ ├── CharSequenceConverter.java │ │ │ └── ParamUtil.java │ │ └── value │ │ │ ├── ImmutableAnnotationEncodedValue.java │ │ │ ├── ImmutableArrayEncodedValue.java │ │ │ ├── ImmutableBooleanEncodedValue.java │ │ │ ├── ImmutableByteEncodedValue.java │ │ │ ├── ImmutableCharEncodedValue.java │ │ │ ├── ImmutableDoubleEncodedValue.java │ │ │ ├── ImmutableEncodedValue.java │ │ │ ├── ImmutableEncodedValueFactory.java │ │ │ ├── ImmutableEnumEncodedValue.java │ │ │ ├── ImmutableFieldEncodedValue.java │ │ │ ├── ImmutableFloatEncodedValue.java │ │ │ ├── ImmutableIntEncodedValue.java │ │ │ ├── ImmutableLongEncodedValue.java │ │ │ ├── ImmutableMethodEncodedValue.java │ │ │ ├── ImmutableNullEncodedValue.java │ │ │ ├── ImmutableShortEncodedValue.java │ │ │ ├── ImmutableStringEncodedValue.java │ │ │ └── ImmutableTypeEncodedValue.java │ ├── rewriter │ │ ├── AnnotationElementRewriter.java │ │ ├── AnnotationRewriter.java │ │ ├── ClassDefRewriter.java │ │ ├── DebugItemRewriter.java │ │ ├── DexRewriter.java │ │ ├── EncodedValueRewriter.java │ │ ├── ExceptionHandlerRewriter.java │ │ ├── FieldReferenceRewriter.java │ │ ├── FieldRewriter.java │ │ ├── InstructionRewriter.java │ │ ├── MethodImplementationRewriter.java │ │ ├── MethodParameterRewriter.java │ │ ├── MethodReferenceRewriter.java │ │ ├── MethodRewriter.java │ │ ├── Rewriter.java │ │ ├── RewriterModule.java │ │ ├── RewriterUtils.java │ │ ├── Rewriters.java │ │ ├── TryBlockRewriter.java │ │ └── TypeRewriter.java │ ├── util │ │ ├── AnnotatedBytes.java │ │ ├── EncodedValueUtils.java │ │ ├── FieldUtil.java │ │ ├── InstructionOffsetMap.java │ │ ├── InstructionUtil.java │ │ ├── MethodUtil.java │ │ ├── Preconditions.java │ │ ├── ReferenceUtil.java │ │ ├── SyntheticAccessorFSM.java │ │ ├── SyntheticAccessorResolver.java │ │ └── TypeUtils.java │ └── writer │ │ ├── AnnotationSection.java │ │ ├── AnnotationSetSection.java │ │ ├── ClassSection.java │ │ ├── DebugWriter.java │ │ ├── DexDataWriter.java │ │ ├── DexWriter.java │ │ ├── EncodedValueWriter.java │ │ ├── FieldSection.java │ │ ├── IndexSection.java │ │ ├── InstructionFactory.java │ │ ├── InstructionWriter.java │ │ ├── MethodSection.java │ │ ├── NullableIndexSection.java │ │ ├── NullableOffsetSection.java │ │ ├── OffsetSection.java │ │ ├── ProtoSection.java │ │ ├── StringSection.java │ │ ├── TypeListSection.java │ │ ├── TypeSection.java │ │ ├── builder │ │ ├── BuilderAnnotation.java │ │ ├── BuilderAnnotationElement.java │ │ ├── BuilderAnnotationPool.java │ │ ├── BuilderAnnotationSet.java │ │ ├── BuilderAnnotationSetPool.java │ │ ├── BuilderClassDef.java │ │ ├── BuilderClassPool.java │ │ ├── BuilderContext.java │ │ ├── BuilderEncodedValues.java │ │ ├── BuilderExceptionHandler.java │ │ ├── BuilderField.java │ │ ├── BuilderFieldPool.java │ │ ├── BuilderFieldReference.java │ │ ├── BuilderMapEntryCollection.java │ │ ├── BuilderMethod.java │ │ ├── BuilderMethodParameter.java │ │ ├── BuilderMethodPool.java │ │ ├── BuilderMethodReference.java │ │ ├── BuilderProtoPool.java │ │ ├── BuilderProtoReference.java │ │ ├── BuilderReference.java │ │ ├── BuilderStringPool.java │ │ ├── BuilderStringReference.java │ │ ├── BuilderTryBlock.java │ │ ├── BuilderTypeList.java │ │ ├── BuilderTypeListPool.java │ │ ├── BuilderTypePool.java │ │ ├── BuilderTypeReference.java │ │ └── DexBuilder.java │ │ ├── io │ │ ├── DeferredOutputStream.java │ │ ├── DeferredOutputStreamFactory.java │ │ ├── DexDataStore.java │ │ ├── FileDataStore.java │ │ ├── FileDeferredOutputStream.java │ │ ├── MemoryDataStore.java │ │ └── MemoryDeferredOutputStream.java │ │ ├── pool │ │ ├── AnnotationPool.java │ │ ├── AnnotationSetPool.java │ │ ├── BaseIndexPool.java │ │ ├── BaseNullableOffsetPool.java │ │ ├── BaseOffsetPool.java │ │ ├── ClassPool.java │ │ ├── DexPool.java │ │ ├── FieldPool.java │ │ ├── MethodPool.java │ │ ├── PoolClassDef.java │ │ ├── PoolMethod.java │ │ ├── ProtoPool.java │ │ ├── StringPool.java │ │ ├── StringTypeBasePool.java │ │ ├── TypeListPool.java │ │ └── TypePool.java │ │ └── util │ │ └── TryListBuilder.java ├── smali │ ├── InvalidToken.java │ ├── LexerErrorInterface.java │ ├── LiteralTools.java │ ├── OdexedInstructionException.java │ ├── SemanticException.java │ ├── SmaliMethodParameter.java │ ├── WithRegister.java │ ├── main.java │ ├── smaliFlexLexer.java │ ├── smaliParser.java │ └── smaliTreeWalker.java └── util │ ├── AbstractForwardSequentialList.java │ ├── AbstractListIterator.java │ ├── AlignmentUtils.java │ ├── ArraySortedSet.java │ ├── BitSetUtils.java │ ├── CharSequenceUtils.java │ ├── ClassFileNameHandler.java │ ├── CollectionUtils.java │ ├── ConsoleUtil.java │ ├── ExceptionWithContext.java │ ├── Hex.java │ ├── ImmutableConverter.java │ ├── ImmutableUtils.java │ ├── IndentingWriter.java │ ├── LinearSearch.java │ ├── NakedByteArrayOutputStream.java │ ├── NibbleUtils.java │ ├── NumberUtils.java │ ├── PathUtil.java │ ├── RandomAccessFileInputStream.java │ ├── RandomAccessFileOutputStream.java │ ├── SmaliHelpFormatter.java │ ├── SparseArray.java │ ├── SparseIntArray.java │ ├── StringUtils.java │ ├── StringWrapper.java │ ├── TwoColumnOutput.java │ ├── Utf8Utils.java │ └── WrappedIndentingWriter.java └── keplerproject └── luajava ├── CPtr.java ├── Console.java ├── JavaFunction.java ├── LuaException.java ├── LuaInvocationHandler.java ├── LuaJavaAPI.java ├── LuaObject.java ├── LuaState.java └── LuaStateFactory.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Proguard folder generated by Eclipse 23 | proguard/ 24 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ZjDroid 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.6 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.6 12 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 32 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /XposedBridgeApi-54.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/XposedBridgeApi-54.jar -------------------------------------------------------------------------------- /assets/xposed_init: -------------------------------------------------------------------------------- 1 | com.android.reverse.mod.ReverseXposedModule -------------------------------------------------------------------------------- /ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/ic_launcher-web.png -------------------------------------------------------------------------------- /lib/.gitignore: -------------------------------------------------------------------------------- 1 | /sdk_sources_15 2 | -------------------------------------------------------------------------------- /lib/full_framework_15.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/lib/full_framework_15.jar -------------------------------------------------------------------------------- /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/libs/android-support-v4.jar -------------------------------------------------------------------------------- /libs/antlr-3.5.2-complete.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/libs/antlr-3.5.2-complete.jar -------------------------------------------------------------------------------- /libs/armeabi/libdvmnative.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/libs/armeabi/libdvmnative.so -------------------------------------------------------------------------------- /libs/armeabi/libluajava.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/libs/armeabi/libluajava.so -------------------------------------------------------------------------------- /libs/commons-cli-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/libs/commons-cli-1.2.jar -------------------------------------------------------------------------------- /libs/guava-17.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/libs/guava-17.0.jar -------------------------------------------------------------------------------- /lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-18 15 | -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Miracle963/zjdroid/ab07a26fc7dfc8d1f5f2b14aff7bd9754fe85912/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 19 | 20 | -------------------------------------------------------------------------------- /res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ZjDroid 5 | Settings 6 | ZjDroid是基于Xposed Framewrok的动态逆向分析模块 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/com/android/reverse/apimonitor/AbstractBahaviorHookCallBack.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import com.android.reverse.hook.HookParam; 4 | import com.android.reverse.hook.MethodHookCallBack; 5 | import com.android.reverse.util.Logger; 6 | 7 | public abstract class AbstractBahaviorHookCallBack extends MethodHookCallBack { 8 | 9 | @Override 10 | public void beforeHookedMethod(HookParam param) { 11 | // TODO Auto-generated method stub 12 | Logger.log_behavior("Invoke "+ param.method.getDeclaringClass().getName()+"->"+param.method.getName()); 13 | this.descParam(param); 14 | //this.printStackInfo(); 15 | } 16 | 17 | @Override 18 | public void afterHookedMethod(HookParam param) { 19 | // TODO Auto-generated method stub 20 | //Logger.log_behavior("End Invoke "+ param.method.toString()); 21 | } 22 | 23 | private void printStackInfo(){ 24 | Throwable ex = new Throwable(); 25 | StackTraceElement[] stackElements = ex.getStackTrace(); 26 | if(stackElements != null){ 27 | StackTraceElement st; 28 | for(int i=0; i"); 24 | } 25 | }); 26 | 27 | Method getAccountsByTypeMethod = RefInvoke.findMethodExact( 28 | "android.accounts.AccountManager", ClassLoader.getSystemClassLoader(), 29 | "getAccountsByType",String.class); 30 | hookhelper.hookMethod(getAccountsByTypeMethod, new AbstractBahaviorHookCallBack() { 31 | 32 | @Override 33 | public void descParam(HookParam param) { 34 | // TODO Auto-generated method stub 35 | String type = (String) param.args[0]; 36 | Logger.log_behavior("Get Account By Type ->"); 37 | Logger.log_behavior("type :" +type); 38 | } 39 | }); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/com/android/reverse/apimonitor/ActivityManagerHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | import com.android.reverse.hook.HookParam; 6 | import com.android.reverse.util.Logger; 7 | import com.android.reverse.util.RefInvoke; 8 | 9 | public class ActivityManagerHook extends ApiMonitorHook { 10 | 11 | @Override 12 | public void startHook() { 13 | 14 | Method killBackgroundProcessesmethod = RefInvoke.findMethodExact( 15 | "android.app.ActivityManager", ClassLoader.getSystemClassLoader(), 16 | "killBackgroundProcesses", String.class); 17 | hookhelper.hookMethod(killBackgroundProcessesmethod, new AbstractBahaviorHookCallBack() { 18 | 19 | @Override 20 | public void descParam(HookParam param) { 21 | // TODO Auto-generated method stub 22 | String packageName = (String) param.args[0]; 23 | Logger.log_behavior("kill packagename = "+packageName); 24 | } 25 | }); 26 | 27 | Method forceStopPackagemethod = RefInvoke.findMethodExact( 28 | "android.app.ActivityManager", ClassLoader.getSystemClassLoader(), 29 | "forceStopPackage", String.class); 30 | hookhelper.hookMethod(forceStopPackagemethod, new AbstractBahaviorHookCallBack() { 31 | 32 | @Override 33 | public void descParam(HookParam param) { 34 | // TODO Auto-generated method stub 35 | String packageName = (String) param.args[0]; 36 | Logger.log_behavior("kill packagename = "+packageName); 37 | } 38 | }); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/com/android/reverse/apimonitor/ActivityThreadHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | import com.android.reverse.hook.HookParam; 5 | import com.android.reverse.util.Logger; 6 | import com.android.reverse.util.RefInvoke; 7 | 8 | public class ActivityThreadHook extends ApiMonitorHook { 9 | 10 | @Override 11 | public void startHook() { 12 | // TODO Auto-generated method stub 13 | try { 14 | Class receiverDataClass = Class.forName("android.app.ActivityThread$ReceiverData"); 15 | if (receiverDataClass != null) { 16 | Method handleReceiverMethod = RefInvoke.findMethodExact("android.app.ActivityThread", ClassLoader.getSystemClassLoader(), 17 | "handleReceiver", receiverDataClass); 18 | hookhelper.hookMethod(handleReceiverMethod, new AbstractBahaviorHookCallBack() { 19 | 20 | @Override 21 | public void descParam(HookParam param) { 22 | Logger.log_behavior("The Receiver Information:"); 23 | Object data = param.args[0]; 24 | Logger.log_behavior(data.toString()); 25 | 26 | } 27 | }); 28 | } 29 | } catch (ClassNotFoundException e) { 30 | // TODO Auto-generated catch block 31 | e.printStackTrace(); 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/com/android/reverse/apimonitor/ApiMonitorHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | 4 | import com.android.reverse.hook.HookHelperFacktory; 5 | import com.android.reverse.hook.HookHelperInterface; 6 | 7 | public abstract class ApiMonitorHook { 8 | 9 | protected HookHelperInterface hookhelper = HookHelperFacktory.getHookHelper(); 10 | public static class InvokeInfo{ 11 | private long invokeAtTime; 12 | private String className; 13 | private String methodName; 14 | private Object[] argv; 15 | private Object result; 16 | private Object invokeState; 17 | } 18 | public abstract void startHook(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/com/android/reverse/apimonitor/AudioRecordHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | import com.android.reverse.hook.HookParam; 5 | import com.android.reverse.util.Logger; 6 | import com.android.reverse.util.RefInvoke; 7 | 8 | public class AudioRecordHook extends ApiMonitorHook { 9 | 10 | @Override 11 | public void startHook() { 12 | // TODO Auto-generated method stub 13 | Method startRecordingMethod = RefInvoke.findMethodExact( 14 | "android.media.AudioRecord", ClassLoader.getSystemClassLoader(), 15 | "startRecording"); 16 | hookhelper.hookMethod(startRecordingMethod, new AbstractBahaviorHookCallBack() { 17 | 18 | @Override 19 | public void descParam(HookParam param) { 20 | // TODO Auto-generated method stub 21 | Logger.log_behavior("Audio Recording ->"); 22 | } 23 | }); 24 | 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/com/android/reverse/apimonitor/ConnectivityManagerHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | 6 | import com.android.reverse.hook.HookParam; 7 | import com.android.reverse.util.Logger; 8 | import com.android.reverse.util.RefInvoke; 9 | 10 | public class ConnectivityManagerHook extends ApiMonitorHook { 11 | 12 | @Override 13 | public void startHook() { 14 | 15 | Method setMobileDataEnabledmethod = RefInvoke.findMethodExact( 16 | "android.net.ConnectivityManager", ClassLoader.getSystemClassLoader(), 17 | "setMobileDataEnabled",boolean.class); 18 | hookhelper.hookMethod(setMobileDataEnabledmethod, new AbstractBahaviorHookCallBack() { 19 | 20 | @Override 21 | public void descParam(HookParam param) { 22 | boolean status = (Boolean) param.args[0]; 23 | Logger.log("Set MobileDataEnabled = "+status); 24 | } 25 | }); 26 | 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/com/android/reverse/apimonitor/ContextImplHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | import java.util.Iterator; 5 | import android.content.BroadcastReceiver; 6 | import android.content.IntentFilter; 7 | import com.android.reverse.hook.HookParam; 8 | import com.android.reverse.util.Logger; 9 | import com.android.reverse.util.RefInvoke; 10 | 11 | public class ContextImplHook extends ApiMonitorHook{ 12 | 13 | @Override 14 | public void startHook() { 15 | // TODO Auto-generated method stub 16 | Method registerReceivermethod = RefInvoke.findMethodExact( 17 | "android.app.ContextImpl", ClassLoader.getSystemClassLoader(), 18 | "registerReceiver", BroadcastReceiver.class,IntentFilter.class); 19 | hookhelper.hookMethod(registerReceivermethod, new AbstractBahaviorHookCallBack() { 20 | 21 | @Override 22 | public void descParam(HookParam param) { 23 | // TODO Auto-generated method stub 24 | Logger.log_behavior("Register BroatcastReceiver"); 25 | Logger.log_behavior("The BroatcastReceiver ClassName = "+param.args[0].getClass().toString()); 26 | if(param.args[1] != null){ 27 | String intentstr = descIntentFilter((IntentFilter) param.args[1]); 28 | Logger.log_behavior("Intent Action = ["+intentstr+"]"); 29 | } 30 | } 31 | }); 32 | } 33 | 34 | public String descIntentFilter(IntentFilter intentFilter){ 35 | StringBuilder sb = new StringBuilder(); 36 | Iterator actions =intentFilter.actionsIterator(); 37 | String action = null; 38 | while(actions.hasNext()){ 39 | action = actions.next(); 40 | sb.append(action+","); 41 | } 42 | return sb.toString(); 43 | 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/com/android/reverse/apimonitor/MediaRecorderHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.io.FileDescriptor; 4 | import java.lang.reflect.Method; 5 | 6 | import com.android.reverse.hook.HookParam; 7 | import com.android.reverse.util.Logger; 8 | import com.android.reverse.util.RefInvoke; 9 | 10 | public class MediaRecorderHook extends ApiMonitorHook { 11 | 12 | @Override 13 | public void startHook() { 14 | 15 | Method startmethod = RefInvoke.findMethodExact( 16 | "android.media.MediaRecorder", ClassLoader.getSystemClassLoader(), 17 | "start"); 18 | hookhelper.hookMethod(startmethod, new AbstractBahaviorHookCallBack() { 19 | 20 | @Override 21 | public void descParam(HookParam param) { 22 | // TODO Auto-generated method stub 23 | Logger.log_behavior("Media Record: Start ->"); 24 | String mPath = (String)RefInvoke.getFieldOjbect("android.media.MediaRecorder", param.thisObject, "mPath"); 25 | if(mPath != null) 26 | Logger.log_behavior("Save Path: ->" +mPath); 27 | else{ 28 | FileDescriptor mFd = (FileDescriptor) RefInvoke.getFieldOjbect("android.media.MediaRecorder", param.thisObject, "mFd"); 29 | Logger.log_behavior("Save Path: ->" +mFd.toString()); 30 | } 31 | } 32 | }); 33 | 34 | Method stopmethod = RefInvoke.findMethodExact( 35 | "android.media.MediaRecorder", ClassLoader.getSystemClassLoader(), 36 | "stop"); 37 | hookhelper.hookMethod(stopmethod, new AbstractBahaviorHookCallBack() { 38 | 39 | @Override 40 | public void descParam(HookParam param) { 41 | // TODO Auto-generated method stub 42 | Logger.log_behavior("Media Record: Stop ->"); 43 | } 44 | }); 45 | 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/com/android/reverse/apimonitor/NotificationManagerHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | import android.app.Notification; 5 | 6 | import com.android.reverse.hook.HookParam; 7 | import com.android.reverse.util.Logger; 8 | import com.android.reverse.util.RefInvoke; 9 | 10 | public class NotificationManagerHook extends ApiMonitorHook { 11 | 12 | @Override 13 | public void startHook() { 14 | // TODO Auto-generated method stub 15 | Method notifyMethod = RefInvoke.findMethodExact("android.app.NotificationManager", ClassLoader.getSystemClassLoader(), "notify",int.class,Notification.class); 16 | hookhelper.hookMethod(notifyMethod, new AbstractBahaviorHookCallBack() { 17 | @Override 18 | public void descParam(HookParam param) { 19 | // TODO Auto-generated method stub 20 | Notification notification = (Notification) param.args[1]; 21 | Logger.log_behavior("Send Notification ->"); 22 | Logger.log_behavior(notification.toString()); 23 | } 24 | }); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/com/android/reverse/apimonitor/ProcessBuilderHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | import java.util.List; 5 | import com.android.reverse.hook.HookParam; 6 | import com.android.reverse.util.Logger; 7 | import com.android.reverse.util.RefInvoke; 8 | 9 | 10 | public class ProcessBuilderHook extends ApiMonitorHook { 11 | 12 | @Override 13 | public void startHook() { 14 | // TODO Auto-generated method stub 15 | Method execmethod = RefInvoke.findMethodExact( 16 | "java.lang.ProcessBuilder", ClassLoader.getSystemClassLoader(), 17 | "start"); 18 | hookhelper.hookMethod(execmethod, new AbstractBahaviorHookCallBack() { 19 | @Override 20 | public void descParam(HookParam param) { 21 | // TODO Auto-generated method stub 22 | Logger.log_behavior("Create New Process ->"); 23 | ProcessBuilder pb = (ProcessBuilder) param.thisObject; 24 | List cmds = pb.command(); 25 | StringBuilder sb = new StringBuilder(); 26 | for(int i=0 ;i "); 23 | String[] progs = (String[]) param.args[0]; 24 | for(int i=0 ;i "); 20 | String className = null; 21 | for (int i = 0; i < loadClass.length; i++) { 22 | className = loadClass[i]; 23 | if (!this.isFilterClass(className)) { 24 | Logger.log("ClassName = " + className); 25 | } 26 | } 27 | Logger.log("End Loadable ClassName"); 28 | }else{ 29 | Logger.log("Can't find class loaded by the dex"); 30 | } 31 | } 32 | 33 | private final String[] filterClassName = { "android.support.v4.", "com.android.reverse.", "org.jf.", "org.keplerproject." }; 34 | 35 | private boolean isFilterClass(String className) { 36 | String filterName = null; 37 | for (int i = 0; i < filterClassName.length; i++) { 38 | filterName = filterClassName[i]; 39 | if (className.startsWith(filterName)) { 40 | return true; 41 | } 42 | } 43 | return false; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/com/android/reverse/request/DumpDexFileCommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | 4 | import com.android.reverse.collecter.DexFileInfoCollecter; 5 | import com.android.reverse.collecter.ModuleContext; 6 | import com.android.reverse.util.Logger; 7 | 8 | public class DumpDexFileCommandHandler implements CommandHandler { 9 | 10 | private String dexpath; 11 | 12 | public DumpDexFileCommandHandler(String dexpath) { 13 | this.dexpath = dexpath; 14 | } 15 | 16 | @Override 17 | public void doAction() { 18 | // TODO Auto-generated method stub 19 | String filename = ModuleContext.getInstance().getAppContext().getFilesDir()+"/dexdump.odex"; 20 | DexFileInfoCollecter.getInstance().dumpDexFile(filename, dexpath); 21 | Logger.log("the dexfile data save to ="+filename); 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/com/android/reverse/request/DumpDexInfoCommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | import java.util.HashMap; 4 | import java.util.Iterator; 5 | import com.android.reverse.collecter.DexFileInfo; 6 | import com.android.reverse.collecter.DexFileInfoCollecter; 7 | import com.android.reverse.util.Logger; 8 | 9 | public class DumpDexInfoCommandHandler implements CommandHandler { 10 | 11 | @Override 12 | public void doAction() { 13 | HashMap dexfileInfo = DexFileInfoCollecter.getInstance().dumpDexFileInfo(); 14 | Iterator itor = dexfileInfo.values().iterator(); 15 | DexFileInfo info = null; 16 | Logger.log("The DexFile Infomation ->"); 17 | while (itor.hasNext()) { 18 | info = itor.next(); 19 | Logger.log("filepath:"+ info.getDexPath()+" mCookie:"+info.getmCookie()); 20 | } 21 | Logger.log("End DexFile Infomation"); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/com/android/reverse/request/DumpHeapCommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | import com.android.reverse.collecter.HeapDump; 4 | import com.android.reverse.collecter.ModuleContext; 5 | import com.android.reverse.util.Logger; 6 | 7 | public class DumpHeapCommandHandler implements CommandHandler { 8 | 9 | private static String dumpFileName; 10 | 11 | public DumpHeapCommandHandler() { 12 | dumpFileName = android.os.Process.myPid()+".hprof"; 13 | } 14 | 15 | @Override 16 | public void doAction() { 17 | // TODO Auto-generated method stub 18 | String heapfilePath =ModuleContext.getInstance().getAppContext().getFilesDir()+"/"+dumpFileName; 19 | HeapDump.dumpHeap(heapfilePath); 20 | Logger.log("the heap data save to ="+ heapfilePath); 21 | } 22 | 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/com/android/reverse/request/DumpMemCommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | 4 | import com.android.reverse.collecter.MemDump; 5 | import com.android.reverse.collecter.ModuleContext; 6 | import com.android.reverse.util.Logger; 7 | 8 | public class DumpMemCommandHandler implements CommandHandler { 9 | 10 | private String dumpFileName; 11 | private int start; 12 | private int length; 13 | 14 | public DumpMemCommandHandler(int start, int length){ 15 | this.start = start; 16 | this.length = length; 17 | this.dumpFileName = String.valueOf(start); 18 | } 19 | 20 | @Override 21 | public void doAction() { 22 | // TODO Auto-generated method stub 23 | String memfilePath = ModuleContext.getInstance().getAppContext().getFilesDir()+"/"+dumpFileName; 24 | MemDump.dumpMem(memfilePath,start, length); 25 | Logger.log("the mem data save to ="+ memfilePath); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/com/android/reverse/request/InvokeScriptCommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | import com.android.reverse.collecter.LuaScriptInvoker; 4 | import com.android.reverse.util.Logger; 5 | 6 | public class InvokeScriptCommandHandler implements CommandHandler { 7 | 8 | private String script; 9 | private String filePath; 10 | private ScriptType type; 11 | 12 | public static enum ScriptType { 13 | TEXTTYPE, FILETYPE 14 | } 15 | 16 | public InvokeScriptCommandHandler(String str, ScriptType type) { 17 | this.type = type; 18 | if (type == ScriptType.TEXTTYPE) 19 | this.script = str; 20 | else if (type == ScriptType.FILETYPE) 21 | this.filePath = str; 22 | } 23 | 24 | @Override 25 | public void doAction() { 26 | Logger.log("The Script invoke start"); 27 | if (this.type == ScriptType.TEXTTYPE) { 28 | LuaScriptInvoker.getInstance().invokeScript(script); 29 | } else if (this.type == ScriptType.FILETYPE) { 30 | LuaScriptInvoker.getInstance().invokeFileScript(filePath); 31 | } else { 32 | Logger.log("the script type is invalid"); 33 | } 34 | Logger.log("The Script invoke end"); 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/com/android/reverse/request/NativeHookInfoHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | 4 | import com.android.reverse.collecter.NativeHookCollecter; 5 | 6 | public class NativeHookInfoHandler implements CommandHandler { 7 | 8 | @Override 9 | public void doAction() { 10 | NativeHookCollecter.getInstance().parserNativeHookInfo(); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/com/android/reverse/smali/DexFileHeadersPointer.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.smali; 2 | 3 | public class DexFileHeadersPointer { 4 | 5 | private int baseAddr; 6 | private int pStringIds; 7 | private int pTypeIds; 8 | private int pFieldIds; 9 | private int pMethodIds; 10 | private int pProtoIds; 11 | private int pClassDefs; 12 | private int classCount; 13 | 14 | public int getClassCount() { 15 | return classCount; 16 | } 17 | public void setClassCount(int classCount) { 18 | this.classCount = classCount; 19 | } 20 | public void setBaseAddr(int baseAddr) { 21 | this.baseAddr = baseAddr; 22 | } 23 | public void setpStringIds(int pStringIds) { 24 | this.pStringIds = pStringIds; 25 | } 26 | public void setpTypeIds(int pTypeIds) { 27 | this.pTypeIds = pTypeIds; 28 | } 29 | public void setpFieldIds(int pFieldIds) { 30 | this.pFieldIds = pFieldIds; 31 | } 32 | public void setpMethodIds(int pMethodIds) { 33 | this.pMethodIds = pMethodIds; 34 | } 35 | public void setpProtoIds(int pProtoIds) { 36 | this.pProtoIds = pProtoIds; 37 | } 38 | public void setpClassDefs(int pClassDefs) { 39 | this.pClassDefs = pClassDefs; 40 | } 41 | public int getBaseAddr() { 42 | return baseAddr; 43 | } 44 | public int getpStringIds() { 45 | return pStringIds; 46 | } 47 | public int getpTypeIds() { 48 | return pTypeIds; 49 | } 50 | public int getpFieldIds() { 51 | return pFieldIds; 52 | } 53 | public int getpMethodIds() { 54 | return pMethodIds; 55 | } 56 | public int getpProtoIds() { 57 | return pProtoIds; 58 | } 59 | public int getpClassDefs() { 60 | return pClassDefs; 61 | } 62 | 63 | public String toString(){ 64 | return "baseAddr:"+baseAddr+";pStringIds:"+pStringIds +";pTypeIds:"+pTypeIds+";pFieldIds:"+pFieldIds+";pMethodIds:"+pMethodIds+";pProtoIds:"+pProtoIds+";pClassDefs:"+pClassDefs; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/com/android/reverse/util/Constant.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.util; 2 | 3 | public class Constant { 4 | 5 | public static String FILESAVEPATH = "XAndReverseTool"; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/com/android/reverse/util/Logger.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.util; 2 | 3 | import android.util.Log; 4 | 5 | public class Logger { 6 | 7 | public static String LOGTAG_COMMAN = "zjdroid-shell-"; 8 | public static String LOGTAG_WORKFLOW = "zjdroid-apimonitor-"; 9 | public static boolean DEBUG_ENABLE = true; 10 | public static String PACKAGENAME; 11 | 12 | public static void log(String message){ 13 | if(DEBUG_ENABLE) 14 | Log.d(LOGTAG_COMMAN+PACKAGENAME,message); 15 | } 16 | 17 | public static void log_behavior(String message){ 18 | if(DEBUG_ENABLE) 19 | Log.d(LOGTAG_WORKFLOW+PACKAGENAME,message); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/com/android/reverse/util/Utility.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.util; 2 | 3 | import java.lang.reflect.InvocationTargetException; 4 | import java.lang.reflect.Method; 5 | 6 | public class Utility { 7 | 8 | public static int getApiLevel() { 9 | 10 | try { 11 | Class mClassType = Class.forName("android.os.SystemProperties"); 12 | Method mGetIntMethod = mClassType.getDeclaredMethod("getInt", 13 | String.class, int.class); 14 | mGetIntMethod.setAccessible(true); 15 | return (Integer)mGetIntMethod.invoke(null, "ro.build.version.sdk",14); 16 | } catch (ClassNotFoundException e) { 17 | // TODO Auto-generated catch block 18 | e.printStackTrace(); 19 | } catch (NoSuchMethodException e) { 20 | // TODO Auto-generated catch block 21 | e.printStackTrace(); 22 | } catch (IllegalArgumentException e) { 23 | // TODO Auto-generated catch block 24 | e.printStackTrace(); 25 | } catch (IllegalAccessException e) { 26 | // TODO Auto-generated catch block 27 | e.printStackTrace(); 28 | } catch (InvocationTargetException e) { 29 | // TODO Auto-generated catch block 30 | e.printStackTrace(); 31 | } 32 | return 14; 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/ds/tree/DuplicateKeyException.java: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License 3 | 4 | Copyright (c) 2008 Tahseen Ur Rehman 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | */ 24 | 25 | package ds.tree; 26 | 27 | /** 28 | * excepion thrown if a duplicate key is inserted in a {@link RadixTree} 29 | * 30 | * @author Tahseen Ur Rehman 31 | * email: tahseen.ur.rehman {at.spam.me.not} gmail.com 32 | */ 33 | public class DuplicateKeyException extends RuntimeException 34 | { 35 | private static final long serialVersionUID = 3141795907493885706L; 36 | 37 | public DuplicateKeyException(String msg) 38 | { 39 | super(msg); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/ds/tree/VisitorImpl.java: -------------------------------------------------------------------------------- 1 | package ds.tree; 2 | 3 | 4 | /** 5 | * A simple standard implementation for a {@link visitor}. 6 | * 7 | * @author Dennis Heidsiek 8 | * @param 9 | */ 10 | public abstract class VisitorImpl implements Visitor { 11 | 12 | protected R result; 13 | 14 | public VisitorImpl() { 15 | this.result = null; 16 | } 17 | 18 | public VisitorImpl(R initialValue) { 19 | this.result = initialValue; 20 | } 21 | 22 | public R getResult() { 23 | return result; 24 | } 25 | 26 | abstract public void visit(String key, RadixTreeNode parent, RadixTreeNode node); 27 | } -------------------------------------------------------------------------------- /src/javax/annotation/CheckForNull.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifierNickname 12 | @Nonnull(when = When.MAYBE) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface CheckForNull { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/javax/annotation/CheckForSigned.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | /** 11 | * Used to annotate a value that may be either negative or nonnegative, and 12 | * indicates that uses of it should check for 13 | * negative values before using it in a way that requires the value to be 14 | * nonnegative, and check for it being nonnegative before using it in a way that 15 | * requires it to be negative. 16 | */ 17 | 18 | @Documented 19 | @TypeQualifierNickname 20 | @Nonnegative(when = When.MAYBE) 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface CheckForSigned { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/javax/annotation/CheckReturnValue.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | import javax.annotation.meta.When; 10 | 11 | @Documented 12 | @Target( { ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE, 13 | ElementType.PACKAGE }) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface CheckReturnValue { 16 | When when() default When.ALWAYS; 17 | } 18 | -------------------------------------------------------------------------------- /src/javax/annotation/Detainted.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifierNickname 12 | @Untainted(when = When.ALWAYS) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface Detainted { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/javax/annotation/MatchesPattern.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.util.regex.Pattern; 7 | 8 | import javax.annotation.meta.TypeQualifier; 9 | import javax.annotation.meta.TypeQualifierValidator; 10 | import javax.annotation.meta.When; 11 | 12 | @Documented 13 | @TypeQualifier(applicableTo = String.class) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface MatchesPattern { 16 | @RegEx 17 | String value(); 18 | 19 | int flags() default 0; 20 | 21 | static class Checker implements TypeQualifierValidator { 22 | public When forConstantValue(MatchesPattern annotation, Object value) { 23 | Pattern p = Pattern.compile(annotation.value(), annotation.flags()); 24 | if (p.matcher(((String) value)).matches()) 25 | return When.ALWAYS; 26 | return When.NEVER; 27 | } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/javax/annotation/Nonnegative.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifier; 8 | import javax.annotation.meta.TypeQualifierValidator; 9 | import javax.annotation.meta.When; 10 | 11 | /** Used to annotate a value that should only contain nonnegative values */ 12 | @Documented 13 | @TypeQualifier(applicableTo = Number.class) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface Nonnegative { 16 | When when() default When.ALWAYS; 17 | 18 | class Checker implements TypeQualifierValidator { 19 | 20 | public When forConstantValue(Nonnegative annotation, Object v) { 21 | if (!(v instanceof Number)) 22 | return When.NEVER; 23 | boolean isNegative; 24 | Number value = (Number) v; 25 | if (value instanceof Long) 26 | isNegative = value.longValue() < 0; 27 | else if (value instanceof Double) 28 | isNegative = value.doubleValue() < 0; 29 | else if (value instanceof Float) 30 | isNegative = value.floatValue() < 0; 31 | else 32 | isNegative = value.intValue() < 0; 33 | 34 | if (isNegative) 35 | return When.NEVER; 36 | else 37 | return When.ALWAYS; 38 | 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/javax/annotation/Nonnull.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifier; 8 | import javax.annotation.meta.TypeQualifierValidator; 9 | import javax.annotation.meta.When; 10 | 11 | @Documented 12 | @TypeQualifier 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface Nonnull { 15 | When when() default When.ALWAYS; 16 | 17 | static class Checker implements TypeQualifierValidator { 18 | 19 | public When forConstantValue(Nonnull qualifierqualifierArgument, 20 | Object value) { 21 | if (value == null) 22 | return When.NEVER; 23 | return When.ALWAYS; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/javax/annotation/Nullable.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifierNickname 12 | @Nonnull(when = When.UNKNOWN) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface Nullable { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/javax/annotation/OverridingMethodsMustInvokeSuper.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * When this annotation is applied to a method, it indicates that if this method 11 | * is overridden in a subclass, the overriding method should invoke this method 12 | * (through method invocation on super). 13 | * 14 | */ 15 | @Documented 16 | @Target( { ElementType.METHOD }) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | public @interface OverridingMethodsMustInvokeSuper { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/javax/annotation/ParametersAreNonnullByDefault.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | 8 | import javax.annotation.meta.TypeQualifierDefault; 9 | 10 | /** 11 | * This annotation can be applied to a package, class or method to indicate that 12 | * the method parameters in that element are nonnull by default unless there is: 13 | *
    14 | *
  • An explicit nullness annotation 15 | *
  • The method overrides a method in a superclass (in which case the 16 | * annotation of the corresponding parameter in the superclass applies) 17 | *
  • there is a default parameter annotation applied to a more tightly nested 18 | * element. 19 | *
20 | * 21 | */ 22 | @Documented 23 | @Nonnull 24 | @TypeQualifierDefault(ElementType.PARAMETER) 25 | @Retention(RetentionPolicy.RUNTIME) 26 | public @interface ParametersAreNonnullByDefault { 27 | } 28 | -------------------------------------------------------------------------------- /src/javax/annotation/ParametersAreNullableByDefault.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | 8 | import javax.annotation.meta.TypeQualifierDefault; 9 | 10 | /** 11 | * This annotation can be applied to a package, class or method to indicate that 12 | * the method parameters in that element are nullable by default unless there is: 13 | *
    14 | *
  • An explicit nullness annotation 15 | *
  • The method overrides a method in a superclass (in which case the 16 | * annotation of the corresponding parameter in the superclass applies) 17 | *
  • there is a default parameter annotation applied to a more tightly nested 18 | * element. 19 | *
20 | *

This annotation implies the same "nullness" as no annotation. However, it is different 21 | * than having no annotation, as it is inherited and it can override a ParametersAreNonnullByDefault 22 | * annotation at an outer scope. 23 | * 24 | */ 25 | @Documented 26 | @Nullable 27 | @TypeQualifierDefault(ElementType.PARAMETER) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface ParametersAreNullableByDefault { 30 | } 31 | -------------------------------------------------------------------------------- /src/javax/annotation/PropertyKey.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifier; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifier 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface PropertyKey { 14 | When when() default When.ALWAYS; 15 | } 16 | -------------------------------------------------------------------------------- /src/javax/annotation/RegEx.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.util.regex.Pattern; 7 | import java.util.regex.PatternSyntaxException; 8 | 9 | import javax.annotation.meta.TypeQualifierNickname; 10 | import javax.annotation.meta.TypeQualifierValidator; 11 | import javax.annotation.meta.When; 12 | 13 | /** 14 | * This qualifier is used to denote String values that should be a Regular 15 | * expression. 16 | * 17 | */ 18 | @Documented 19 | @Syntax("RegEx") 20 | @TypeQualifierNickname 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface RegEx { 23 | When when() default When.ALWAYS; 24 | 25 | static class Checker implements TypeQualifierValidator { 26 | 27 | public When forConstantValue(RegEx annotation, Object value) { 28 | if (!(value instanceof String)) 29 | return When.NEVER; 30 | 31 | try { 32 | Pattern.compile((String) value); 33 | } catch (PatternSyntaxException e) { 34 | return When.NEVER; 35 | } 36 | return When.ALWAYS; 37 | 38 | } 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/javax/annotation/Signed.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | /** Used to annotate a value of unknown sign */ 11 | 12 | @Documented 13 | @TypeQualifierNickname 14 | @Nonnegative(when = When.UNKNOWN) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | public @interface Signed { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/javax/annotation/Syntax.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifier; 8 | import javax.annotation.meta.When; 9 | 10 | /** 11 | * This annotation a value that is of a particular syntax, such as Java syntax 12 | * or regular expression syntax. This can be used to provide syntax checking of 13 | * constant values at compile time, run time checking at runtime, and can assist 14 | * IDEs in deciding how to interpret String constants (e.g., should a 15 | * refactoring that renames method x() to y() update the String constant "x()"). 16 | * 17 | * 18 | */ 19 | @Documented 20 | @TypeQualifier(applicableTo = CharSequence.class) 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface Syntax { 23 | /** 24 | * Value indicating the particular syntax denoted by this annotation. 25 | * Different tools will recognize different syntaxes, but some proposed 26 | * canonical values are: 27 | *

    28 | *
  • "Java" 29 | *
  • "RegEx" 30 | *
  • "JavaScript" 31 | *
  • "Ruby" 32 | *
  • "Groovy" 33 | *
  • "SQL" 34 | *
  • "FormatString" 35 | *
36 | * 37 | * Syntax names can be followed by a colon and a list of key value pairs, 38 | * separated by commas. For example, "SQL:dialect=Oracle,version=2.3". Tools 39 | * should ignore any keys they don't recognize. 40 | */ 41 | String value(); 42 | 43 | When when() default When.ALWAYS; 44 | } 45 | -------------------------------------------------------------------------------- /src/javax/annotation/Tainted.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifierNickname 12 | @Untainted(when = When.MAYBE) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface Tainted { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/javax/annotation/Untainted.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifier; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifier 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface Untainted { 14 | When when() default When.ALWAYS; 15 | } 16 | -------------------------------------------------------------------------------- /src/javax/annotation/WillClose.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | @Documented 8 | @Retention(RetentionPolicy.RUNTIME) 9 | /** 10 | * Used to annotate a method parameter to indicate that this method will close 11 | * the resource. 12 | */ 13 | public @interface WillClose { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/javax/annotation/WillCloseWhenClosed.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | @Documented 8 | @Retention(RetentionPolicy.RUNTIME) 9 | /** 10 | * Used to annotate a constructor/factory parameter to indicate that returned 11 | * object (X) will close the resource when X is closed. 12 | */ 13 | public @interface WillCloseWhenClosed { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/javax/annotation/WillNotClose.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | @Documented 8 | @Retention(RetentionPolicy.RUNTIME) 9 | /** 10 | * Used to annotate a method parameter to indicate that this method will not 11 | * close the resource. 12 | */ 13 | public @interface WillNotClose { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/javax/annotation/concurrent/GuardedBy.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.concurrent; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /* 9 | * Copyright (c) 2005 Brian Goetz 10 | * Released under the Creative Commons Attribution License 11 | * (http://creativecommons.org/licenses/by/2.5) 12 | * Official home: http://www.jcip.net 13 | */ 14 | 15 | /** 16 | * GuardedBy 17 | * 18 | * The field or method to which this annotation is applied can only be accessed 19 | * when holding a particular lock, which may be a built-in (synchronization) 20 | * lock, or may be an explicit java.util.concurrent.Lock. 21 | * 22 | * The argument determines which lock guards the annotated field or method: this : 23 | * The string literal "this" means that this field is guarded by the class in 24 | * which it is defined. class-name.this : For inner classes, it may be necessary 25 | * to disambiguate 'this'; the class-name.this designation allows you to specify 26 | * which 'this' reference is intended itself : For reference fields only; the 27 | * object to which the field refers. field-name : The lock object is referenced 28 | * by the (instance or static) field specified by field-name. 29 | * class-name.field-name : The lock object is reference by the static field 30 | * specified by class-name.field-name. method-name() : The lock object is 31 | * returned by calling the named nil-ary method. class-name.class : The Class 32 | * object for the specified class should be used as the lock object. 33 | */ 34 | @Target( { ElementType.FIELD, ElementType.METHOD }) 35 | @Retention(RetentionPolicy.CLASS) 36 | public @interface GuardedBy { 37 | String value(); 38 | } 39 | -------------------------------------------------------------------------------- /src/javax/annotation/concurrent/Immutable.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.concurrent; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /* 10 | * Copyright (c) 2005 Brian Goetz 11 | * Released under the Creative Commons Attribution License 12 | * (http://creativecommons.org/licenses/by/2.5) 13 | * Official home: http://www.jcip.net 14 | */ 15 | 16 | /** 17 | * Immutable 18 | * 19 | * The class to which this annotation is applied is immutable. This means that 20 | * its state cannot be seen to change by callers. Of necessity this means that 21 | * all public fields are final, and that all public final reference fields refer 22 | * to other immutable objects, and that methods do not publish references to any 23 | * internal state which is mutable by implementation even if not by design. 24 | * Immutable objects may still have internal mutable state for purposes of 25 | * performance optimization; some state variables may be lazily computed, so 26 | * long as they are computed from immutable state and that callers cannot tell 27 | * the difference. 28 | * 29 | * Immutable objects are inherently thread-safe; they may be passed between 30 | * threads or published without synchronization. 31 | */ 32 | @Documented 33 | @Target(ElementType.TYPE) 34 | @Retention(RetentionPolicy.CLASS) 35 | public @interface Immutable { 36 | } 37 | -------------------------------------------------------------------------------- /src/javax/annotation/concurrent/NotThreadSafe.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.concurrent; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /* 10 | * Copyright (c) 2005 Brian Goetz 11 | * Released under the Creative Commons Attribution License 12 | * (http://creativecommons.org/licenses/by/2.5) 13 | * Official home: http://www.jcip.net 14 | */ 15 | 16 | /** 17 | * NotThreadSafe 18 | * 19 | * The class to which this annotation is applied is not thread-safe. This 20 | * annotation primarily exists for clarifying the non-thread-safety of a class 21 | * that might otherwise be assumed to be thread-safe, despite the fact that it 22 | * is a bad idea to assume a class is thread-safe without good reason. 23 | * 24 | * @see ThreadSafe 25 | */ 26 | @Documented 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.CLASS) 29 | public @interface NotThreadSafe { 30 | } 31 | -------------------------------------------------------------------------------- /src/javax/annotation/concurrent/ThreadSafe.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.concurrent; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * ThreadSafe 11 | * 12 | * The class to which this annotation is applied is thread-safe. This means that 13 | * no sequences of accesses (reads and writes to public fields, calls to public 14 | * methods) may put the object into an invalid state, regardless of the 15 | * interleaving of those actions by the runtime, and without requiring any 16 | * additional synchronization or coordination on the part of the caller. 17 | */ 18 | @Documented 19 | @Target(ElementType.TYPE) 20 | @Retention(RetentionPolicy.CLASS) 21 | public @interface ThreadSafe { 22 | } 23 | -------------------------------------------------------------------------------- /src/javax/annotation/meta/Exclusive.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | /** 8 | * This annotation can be applied to the value() element of an annotation that 9 | * is annotated as a TypeQualifier. 10 | * 11 | * For example, the following defines a type qualifier such that if you know a 12 | * value is {@literal @Foo(1)}, then the value cannot be {@literal @Foo(2)} or {{@literal @Foo(3)}. 13 | * 14 | * 15 | * @TypeQualifier @interface Foo { 16 | * @Exclusive int value(); 17 | * } 18 | * 19 | * 20 | */ 21 | 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Exclusive { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/javax/annotation/meta/Exhaustive.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | /** 8 | * This annotation can be applied to the value() element of an annotation that 9 | * is annotated as a TypeQualifier. This is only appropriate if the value field 10 | * returns a value that is an Enumeration. 11 | * 12 | * Applications of the type qualifier with different values are exclusive, and 13 | * the enumeration is an exhaustive list of the possible values. 14 | * 15 | * For example, the following defines a type qualifier such that if you know a 16 | * value is neither {@literal @Foo(Color.Red)} or {@literal @Foo(Color.Blue)}, 17 | * then the value must be {@literal @Foo(Color.Green)}. And if you know it is 18 | * {@literal @Foo(Color.Green)}, you know it cannot be 19 | * {@literal @Foo(Color.Red)} or {@literal @Foo(Color.Blue)} 20 | * 21 | * 22 | * @TypeQualifier @interface Foo { 23 | * enum Color {RED, BLUE, GREEN}; 24 | * @Exhaustive Color value(); 25 | * } 26 | * 27 | */ 28 | 29 | @Documented 30 | @Retention(RetentionPolicy.RUNTIME) 31 | public @interface Exhaustive { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/javax/annotation/meta/TypeQualifier.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * This qualifier is applied to an annotation to denote that the annotation 11 | * should be treated as a type qualifier. 12 | */ 13 | 14 | @Documented 15 | @Target(ElementType.ANNOTATION_TYPE) 16 | @Retention(RetentionPolicy.RUNTIME) 17 | public @interface TypeQualifier { 18 | 19 | /** 20 | * Describes the kinds of values the qualifier can be applied to. If a 21 | * numeric class is provided (e.g., Number.class or Integer.class) then the 22 | * annotation can also be applied to the corresponding primitive numeric 23 | * types. 24 | */ 25 | Class applicableTo() default Object.class; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/javax/annotation/meta/TypeQualifierDefault.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * This qualifier is applied to an annotation to denote that the annotation 11 | * defines a default type qualifier that is visible within the scope of the 12 | * element it is applied to. 13 | */ 14 | 15 | @Documented 16 | @Target(ElementType.ANNOTATION_TYPE) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | public @interface TypeQualifierDefault { 19 | ElementType[] value() default {}; 20 | } 21 | -------------------------------------------------------------------------------- /src/javax/annotation/meta/TypeQualifierNickname.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Target; 6 | 7 | /** 8 | * 9 | * This annotation is applied to a annotation, and marks the annotation as being 10 | * a qualifier nickname. Applying a nickname annotation X to a element Y should 11 | * be interpreted as having the same meaning as applying all of annotations of X 12 | * (other than QualifierNickname) to Y. 13 | * 14 | *

15 | * Thus, you might define a qualifier SocialSecurityNumber as follows: 16 | *

17 | * 18 | * 19 | * 20 | @Documented 21 | @TypeQualifierNickname @Pattern("[0-9]{3}-[0-9]{2}-[0-9]{4}") 22 | @Retention(RetentionPolicy.RUNTIME) 23 | public @interface SocialSecurityNumber { 24 | } 25 | 26 | * 27 | * 28 | */ 29 | @Documented 30 | @Target(ElementType.ANNOTATION_TYPE) 31 | public @interface TypeQualifierNickname { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/javax/annotation/meta/TypeQualifierValidator.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Annotation; 4 | 5 | import javax.annotation.Nonnull; 6 | 7 | public interface TypeQualifierValidator { 8 | /** 9 | * Given a type qualifier, check to see if a known specific constant value 10 | * is an instance of the set of values denoted by the qualifier. 11 | * 12 | * @param annotation 13 | * the type qualifier 14 | * @param value 15 | * the value to check 16 | * @return a value indicating whether or not the value is an member of the 17 | * values denoted by the type qualifier 18 | */ 19 | public @Nonnull 20 | When forConstantValue(@Nonnull A annotation, Object value); 21 | } 22 | -------------------------------------------------------------------------------- /src/javax/annotation/meta/When.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | /** 4 | * Used to describe the relationship between a qualifier T and the set of values 5 | * S possible on an annotated element. 6 | * 7 | * In particular, an issues should be reported if an ALWAYS or MAYBE value is 8 | * used where a NEVER value is required, or if a NEVER or MAYBE value is used 9 | * where an ALWAYS value is required. 10 | * 11 | * 12 | */ 13 | public enum When { 14 | /** S is a subset of T */ 15 | ALWAYS, 16 | /** nothing definitive is known about the relation between S and T */ 17 | UNKNOWN, 18 | /** S intersection T is non empty and S - T is nonempty */ 19 | MAYBE, 20 | /** S intersection T is empty */ 21 | NEVER; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/org/jf/baksmali/Renderers/DoubleRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * [The "BSD licence"] 3 | * Copyright (c) 2010 Ben Gruver 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote products 15 | * derived from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | package org.jf.baksmali.Renderers; 30 | 31 | import org.jf.util.IndentingWriter; 32 | 33 | import java.io.IOException; 34 | 35 | public class DoubleRenderer { 36 | public static void writeTo(IndentingWriter writer, double val) throws IOException { 37 | writer.write(Double.toString(val)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/org/jf/baksmali/Renderers/FloatRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * [The "BSD licence"] 3 | * Copyright (c) 2010 Ben Gruver (JesusFreke) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote products 15 | * derived from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | package org.jf.baksmali.Renderers; 30 | 31 | import org.jf.util.IndentingWriter; 32 | 33 | import java.io.IOException; 34 | 35 | public class FloatRenderer { 36 | public static void writeTo(IndentingWriter writer, float val) throws IOException { 37 | writer.write(Float.toString(val)); 38 | writer.write('f'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/builder/instruction/BuilderSwitchElement.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.builder.instruction; 2 | 3 | import org.jf.dexlib2.builder.BuilderSwitchPayload; 4 | import org.jf.dexlib2.builder.Label; 5 | import org.jf.dexlib2.iface.instruction.SwitchElement; 6 | 7 | import javax.annotation.Nonnull; 8 | 9 | public class BuilderSwitchElement implements SwitchElement { 10 | @Nonnull BuilderSwitchPayload parent; 11 | private final int key; 12 | @Nonnull private final Label target; 13 | 14 | public BuilderSwitchElement(@Nonnull BuilderSwitchPayload parent, 15 | int key, 16 | @Nonnull Label target) { 17 | this.parent = parent; 18 | this.key = key; 19 | this.target = target; 20 | } 21 | 22 | @Override public int getKey() { 23 | return key; 24 | } 25 | 26 | @Override public int getOffset() { 27 | return target.getCodeAddress() - parent.getReferrer().getCodeAddress(); 28 | } 29 | 30 | @Nonnull 31 | public Label getTarget() { 32 | return target; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/dexbacked/DexBackedExceptionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.dexbacked; 33 | 34 | import org.jf.dexlib2.base.BaseExceptionHandler; 35 | 36 | public abstract class DexBackedExceptionHandler extends BaseExceptionHandler { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/dexbacked/DexReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.dexbacked; 33 | 34 | import javax.annotation.Nonnull; 35 | 36 | public class DexReader extends BaseDexReader { 37 | public DexReader(@Nonnull DexBackedDexFile dexFile, int offset) { 38 | super(dexFile, offset); 39 | } 40 | } -------------------------------------------------------------------------------- /src/org/jf/dexlib2/dexbacked/MemoryDexFileItemPointer.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.dexbacked; 2 | 3 | public class MemoryDexFileItemPointer { 4 | 5 | private int baseAddr; 6 | private int pStringIds; 7 | private int pTypeIds; 8 | private int pFieldIds; 9 | private int pMethodIds; 10 | private int pProtoIds; 11 | private int pClassDefs; 12 | private int classCount; 13 | 14 | 15 | 16 | public int getClassCount() { 17 | return classCount; 18 | } 19 | public void setClassCount(int classCount) { 20 | this.classCount = classCount; 21 | } 22 | public void setBaseAddr(int baseAddr) { 23 | this.baseAddr = baseAddr; 24 | } 25 | public void setpStringIds(int pStringIds) { 26 | this.pStringIds = pStringIds; 27 | } 28 | public void setpTypeIds(int pTypeIds) { 29 | this.pTypeIds = pTypeIds; 30 | } 31 | public void setpFieldIds(int pFieldIds) { 32 | this.pFieldIds = pFieldIds; 33 | } 34 | public void setpMethodIds(int pMethodIds) { 35 | this.pMethodIds = pMethodIds; 36 | } 37 | public void setpProtoIds(int pProtoIds) { 38 | this.pProtoIds = pProtoIds; 39 | } 40 | public void setpClassDefs(int pClassDefs) { 41 | this.pClassDefs = pClassDefs; 42 | } 43 | public int getBaseAddr() { 44 | return baseAddr; 45 | } 46 | public int getpStringIds() { 47 | return pStringIds; 48 | } 49 | public int getpTypeIds() { 50 | return pTypeIds; 51 | } 52 | public int getpFieldIds() { 53 | return pFieldIds; 54 | } 55 | public int getpMethodIds() { 56 | return pMethodIds; 57 | } 58 | public int getpProtoIds() { 59 | return pProtoIds; 60 | } 61 | public int getpClassDefs() { 62 | return pClassDefs; 63 | } 64 | 65 | public String toString(){ 66 | return "baseAddr:"+baseAddr+";pStringIds:"+pStringIds +";pTypeIds:"+pTypeIds+";pFieldIds:"+pFieldIds+";pMethodIds:"+pMethodIds+";pProtoIds:"+pProtoIds+";pClassDefs:"+pClassDefs; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/dexbacked/MemoryReader.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.dexbacked; 2 | 3 | public interface MemoryReader { 4 | 5 | public byte[] readBytes(int start, int lenght); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/BasicAnnotation.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.iface; 2 | 3 | import javax.annotation.Nonnull; 4 | import java.util.Set; 5 | 6 | /** 7 | * This represents a basic annotation, and serves as a common superclass for Annotation and AnnotationEncodedValue 8 | */ 9 | public interface BasicAnnotation { 10 | /** 11 | * Gets the type of this annotation. 12 | * 13 | * This will be the type descriptor of the class that defines this annotation. 14 | * 15 | * @return The type of this annotation 16 | */ 17 | @Nonnull String getType(); 18 | 19 | /** 20 | * Gets a set of the name/value elements associated with this annotation. 21 | * 22 | * The elements in the returned set will be unique with respect to the element name. 23 | * 24 | * @return A set of AnnotationElements 25 | */ 26 | @Nonnull Set getElements(); 27 | } 28 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/debug/EndLocal.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.debug; 33 | 34 | public interface EndLocal extends DebugItem, LocalInfo { 35 | int getRegister(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/debug/EpilogueBegin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.debug; 33 | 34 | public interface EpilogueBegin extends DebugItem { 35 | } 36 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/debug/LocalInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.debug; 33 | 34 | import javax.annotation.Nullable; 35 | 36 | public interface LocalInfo { 37 | @Nullable String getName(); 38 | @Nullable String getType(); 39 | @Nullable String getSignature(); 40 | } 41 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/debug/PrologueEnd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.debug; 33 | 34 | public interface PrologueEnd extends DebugItem { 35 | } 36 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/debug/RestartLocal.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.debug; 33 | 34 | public interface RestartLocal extends DebugItem, LocalInfo { 35 | int getRegister(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/debug/SetSourceFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.debug; 33 | 34 | import org.jf.dexlib2.iface.reference.StringReference; 35 | 36 | import javax.annotation.Nullable; 37 | 38 | public interface SetSourceFile extends DebugItem { 39 | @Nullable String getSourceFile(); 40 | @Nullable StringReference getSourceFileReference(); 41 | } 42 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/FieldOffsetInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface FieldOffsetInstruction extends Instruction { 35 | int getFieldOffset(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/FiveRegisterInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface FiveRegisterInstruction extends VariableRegisterInstruction { 35 | int getRegisterC(); 36 | int getRegisterD(); 37 | int getRegisterE(); 38 | int getRegisterF(); 39 | int getRegisterG(); 40 | } 41 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/HatLiteralInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface HatLiteralInstruction extends Instruction { 35 | /** 36 | * @return the high order 16 bits of the literal, as a short value 37 | */ 38 | short getHatLiteral(); 39 | } 40 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/InlineIndexInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface InlineIndexInstruction extends Instruction { 35 | int getInlineIndex(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/LongHatLiteralInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface LongHatLiteralInstruction extends WideLiteralInstruction, HatLiteralInstruction { 35 | } 36 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/NarrowHatLiteralInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface NarrowHatLiteralInstruction extends HatLiteralInstruction, NarrowLiteralInstruction { 35 | } 36 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/NarrowLiteralInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface NarrowLiteralInstruction extends WideLiteralInstruction { 35 | int getNarrowLiteral(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/OffsetInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface OffsetInstruction extends Instruction { 35 | int getCodeOffset(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/OneRegisterInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface OneRegisterInstruction extends Instruction { 35 | int getRegisterA(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/PayloadInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | /** 35 | * Empty marker interface for the switch/array payload instructions 36 | */ 37 | public interface PayloadInstruction extends Instruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/ReferenceInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | import org.jf.dexlib2.iface.reference.Reference; 35 | 36 | import javax.annotation.Nonnull; 37 | 38 | public interface ReferenceInstruction extends Instruction { 39 | @Nonnull Reference getReference(); 40 | int getReferenceType(); 41 | } 42 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/RegisterRangeInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface RegisterRangeInstruction extends VariableRegisterInstruction { 35 | int getStartRegister(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/SwitchElement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface SwitchElement { 35 | public int getKey(); 36 | public int getOffset(); 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/SwitchPayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | import javax.annotation.Nonnull; 35 | import java.util.List; 36 | 37 | public interface SwitchPayload extends PayloadInstruction { 38 | @Nonnull List getSwitchElements(); 39 | } 40 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/ThreeRegisterInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface ThreeRegisterInstruction extends TwoRegisterInstruction { 35 | int getRegisterC(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/TwoRegisterInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface TwoRegisterInstruction extends OneRegisterInstruction { 35 | int getRegisterB(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/VariableRegisterInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface VariableRegisterInstruction extends Instruction { 35 | int getRegisterCount(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/VerificationErrorInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface VerificationErrorInstruction extends Instruction { 35 | int getVerificationError(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/VtableIndexInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface VtableIndexInstruction extends Instruction { 35 | int getVtableIndex(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/WideLiteralInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface WideLiteralInstruction extends Instruction { 35 | long getWideLiteral(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction10t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | 36 | public interface Instruction10t extends OffsetInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction10x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.Instruction; 35 | 36 | public interface Instruction10x extends Instruction { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction11n.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction; 35 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 36 | 37 | public interface Instruction11n extends OneRegisterInstruction, NarrowLiteralInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction11x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 35 | 36 | public interface Instruction11x extends OneRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction12x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 35 | 36 | public interface Instruction12x extends TwoRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction20t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | 36 | public interface Instruction20t extends OffsetInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction21c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 35 | import org.jf.dexlib2.iface.instruction.ReferenceInstruction; 36 | 37 | public interface Instruction21c extends OneRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction21t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 36 | 37 | public interface Instruction21t extends OneRegisterInstruction, OffsetInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction22c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.ReferenceInstruction; 35 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 36 | 37 | public interface Instruction22c extends TwoRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction22cs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.FieldOffsetInstruction; 35 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 36 | 37 | public interface Instruction22cs extends TwoRegisterInstruction, FieldOffsetInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction22t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 36 | 37 | public interface Instruction22t extends TwoRegisterInstruction, OffsetInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction22x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 35 | 36 | public interface Instruction22x extends TwoRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction23x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.ThreeRegisterInstruction; 35 | 36 | public interface Instruction23x extends ThreeRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction30t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | 36 | public interface Instruction30t extends OffsetInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction31c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 35 | import org.jf.dexlib2.iface.instruction.ReferenceInstruction; 36 | 37 | public interface Instruction31c extends OneRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction31t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 36 | 37 | public interface Instruction31t extends OneRegisterInstruction, OffsetInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction32x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 35 | 36 | public interface Instruction32x extends TwoRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction35c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction; 35 | import org.jf.dexlib2.iface.instruction.ReferenceInstruction; 36 | 37 | public interface Instruction35c extends FiveRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction3rc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.ReferenceInstruction; 35 | import org.jf.dexlib2.iface.instruction.RegisterRangeInstruction; 36 | 37 | public interface Instruction3rc extends RegisterRangeInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction51l.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 35 | import org.jf.dexlib2.iface.instruction.WideLiteralInstruction; 36 | 37 | public interface Instruction51l extends OneRegisterInstruction, WideLiteralInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/PackedSwitchPayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.SwitchPayload; 35 | 36 | public interface PackedSwitchPayload extends SwitchPayload { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/SparseSwitchPayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.SwitchPayload; 35 | 36 | public interface SparseSwitchPayload extends SwitchPayload { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/UnknownInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | public interface UnknownInstruction extends Instruction10x { 35 | int getOriginalOpcode(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/reference/Reference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.reference; 33 | 34 | /** 35 | * This class is the base interface for field/method/string/type references in a dex file. It has no functionality or 36 | * contract itself. 37 | */ 38 | public interface Reference { 39 | } 40 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/immutable/reference/ImmutableReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.immutable.reference; 33 | 34 | import org.jf.dexlib2.ReferenceType; 35 | import org.jf.dexlib2.iface.reference.*; 36 | import org.jf.util.ExceptionWithContext; 37 | 38 | import javax.annotation.Nonnull; 39 | 40 | public interface ImmutableReference extends Reference { 41 | } 42 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/immutable/value/ImmutableEncodedValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.immutable.value; 33 | 34 | import org.jf.dexlib2.iface.value.EncodedValue; 35 | 36 | public interface ImmutableEncodedValue extends EncodedValue { 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/rewriter/Rewriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.rewriter; 33 | 34 | import javax.annotation.Nonnull; 35 | 36 | public interface Rewriter { 37 | @Nonnull 38 | T rewrite(@Nonnull T value); 39 | } 40 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/rewriter/TypeRewriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.rewriter; 33 | 34 | import javax.annotation.Nonnull; 35 | 36 | public class TypeRewriter implements Rewriter { 37 | @Nonnull @Override public String rewrite(@Nonnull String value) { 38 | return value; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/IndexSection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.writer; 33 | 34 | import javax.annotation.Nonnull; 35 | import java.util.Collection; 36 | import java.util.Map; 37 | 38 | public interface IndexSection { 39 | int getItemIndex(@Nonnull Key key); 40 | @Nonnull Collection> getItems(); 41 | } 42 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/NullableIndexSection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.writer; 33 | 34 | import javax.annotation.Nullable; 35 | 36 | public interface NullableIndexSection extends IndexSection { 37 | int getNullableItemIndex(@Nullable Key key); 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/NullableOffsetSection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.writer; 33 | 34 | import javax.annotation.Nullable; 35 | 36 | public interface NullableOffsetSection extends OffsetSection { 37 | int getNullableItemOffset(@Nullable Key key); 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/OffsetSection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.writer; 33 | 34 | import javax.annotation.Nonnull; 35 | import java.util.Collection; 36 | import java.util.Map; 37 | 38 | public interface OffsetSection { 39 | int getItemOffset(@Nonnull Key key); 40 | @Nonnull Collection> getItems(); 41 | } 42 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/builder/BuilderReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.writer.builder; 33 | 34 | import org.jf.dexlib2.iface.reference.Reference; 35 | 36 | public interface BuilderReference extends Reference { 37 | int getIndex(); 38 | void setIndex(int index); 39 | } 40 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/io/DeferredOutputStream.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.writer.io; 2 | 3 | import java.io.IOException; 4 | import java.io.OutputStream; 5 | 6 | public abstract class DeferredOutputStream extends OutputStream { 7 | public abstract void writeTo(OutputStream output) throws IOException; 8 | } 9 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/io/DeferredOutputStreamFactory.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.writer.io; 2 | 3 | import java.io.IOException; 4 | 5 | public interface DeferredOutputStreamFactory { 6 | DeferredOutputStream makeDeferredOutputStream() throws IOException; 7 | } 8 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/io/DexDataStore.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.writer.io; 2 | 3 | import javax.annotation.Nonnull; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | import java.io.OutputStream; 7 | 8 | public interface DexDataStore { 9 | @Nonnull OutputStream outputAt(int offset); 10 | @Nonnull InputStream readAt(int offset); 11 | void close() throws IOException; 12 | } 13 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/io/FileDataStore.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.writer.io; 2 | 3 | import org.jf.util.RandomAccessFileInputStream; 4 | import org.jf.util.RandomAccessFileOutputStream; 5 | 6 | import javax.annotation.Nonnull; 7 | import java.io.*; 8 | 9 | public class FileDataStore implements DexDataStore { 10 | private final RandomAccessFile raf; 11 | 12 | public FileDataStore(@Nonnull File file) throws FileNotFoundException, IOException { 13 | this.raf = new RandomAccessFile(file, "rw"); 14 | this.raf.setLength(0); 15 | } 16 | 17 | @Nonnull @Override public OutputStream outputAt(int offset) { 18 | return new RandomAccessFileOutputStream(raf, offset); 19 | } 20 | 21 | @Nonnull @Override public InputStream readAt(int offset) { 22 | return new RandomAccessFileInputStream(raf, offset); 23 | } 24 | 25 | @Override public void close() throws IOException { 26 | raf.close(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/org/jf/smali/WithRegister.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.smali; 33 | 34 | public interface WithRegister { 35 | int getRegister(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/keplerproject/luajava/LuaException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: LuaException.java,v 1.6 2006/12/22 14:06:40 thiago Exp $ 3 | * Copyright (C) 2003-2007 Kepler Project. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | package org.keplerproject.luajava; 26 | 27 | /** 28 | * LuaJava exception 29 | * 30 | * @author Thiago Ponte 31 | * 32 | */ 33 | public class LuaException extends Exception 34 | { 35 | /** 36 | * 37 | */ 38 | private static final long serialVersionUID = 1L; 39 | 40 | public LuaException(String str) 41 | { 42 | super(str); 43 | } 44 | 45 | /** 46 | * Will work only on Java 1.4 or later. 47 | * To work with Java 1.3, comment the first line and uncomment the second one. 48 | */ 49 | public LuaException(Exception e) 50 | { 51 | super((e.getCause() != null) ? e.getCause() : e); 52 | //super(e.getMessage()); 53 | } 54 | } --------------------------------------------------------------------------------