Misc cleanup/refactoring

git-svn-id: https://smali.googlecode.com/svn/trunk@203 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-06-21 20:06:46 +00:00
parent f730ada982
commit cb83d271e5
107 changed files with 254 additions and 281 deletions

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.util.Output;
import org.jf.dexlib.Util.Input;
import org.jf.dexlib.Util.Output;
public class ByteField extends CachedIntegerValueField {
public ByteField(String fieldName) {

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Output;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Output;
public abstract class CachedIntegerValueField<T extends CachedIntegerValueField>
implements Field<T> {

View File

@ -28,7 +28,7 @@
package org.jf.dexlib;
import org.jf.dexlib.util.*;
import org.jf.dexlib.Util.*;
import java.util.ArrayList;
import java.util.Collections;

View File

@ -30,7 +30,7 @@ package org.jf.dexlib;
import org.jf.dexlib.EncodedValue.EncodedValue;
import org.jf.dexlib.EncodedValue.EncodedValueSubField;
import org.jf.dexlib.util.TypeUtils;
import org.jf.dexlib.Util.TypeUtils;
import java.util.ArrayList;
import java.util.HashMap;

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.Input;
import java.util.ArrayList;
import java.util.List;

View File

@ -26,9 +26,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.Code.Instruction;
public enum Format
{

View File

@ -26,12 +26,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
public class Instruction10t extends Instruction
{

View File

@ -26,12 +26,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
public class Instruction10x extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction11n extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction11x extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction12x extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction20t extends Instruction
{

View File

@ -26,14 +26,14 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.TypeIdItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction21c extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction21h extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction21s extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction21t extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction22b extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction22c extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction22s extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction22t extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction22x extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction23x extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction30t extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction31c extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction31i extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction31t extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction32x extends Instruction
{

View File

@ -26,16 +26,16 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.MethodIdItem;
import org.jf.dexlib.TypeIdItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import static org.jf.dexlib.code.Opcode.*;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import static org.jf.dexlib.Code.Opcode.*;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction35c extends Instruction
{

View File

@ -26,16 +26,16 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.MethodIdItem;
import org.jf.dexlib.TypeIdItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import static org.jf.dexlib.code.Opcode.*;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import static org.jf.dexlib.Code.Opcode.*;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction3rc extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.NumberUtils;
public class Instruction51l extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.Input;
public class PackedSwitchDataPseudoInstruction extends Instruction
{

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code.Format;
package org.jf.dexlib.Code.Format;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Instruction;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.Input;
public class SparseSwitchDataPseudoInstruction extends Instruction
{

View File

@ -26,11 +26,11 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code;
package org.jf.dexlib.Code;
import org.jf.dexlib.*;
import org.jf.dexlib.util.NumberUtils;
import org.jf.dexlib.code.Format.Format;
import org.jf.dexlib.Util.NumberUtils;
import org.jf.dexlib.Code.Format.Format;
public abstract class Instruction {
private DexFile dexFile;

View File

@ -26,16 +26,16 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code;
package org.jf.dexlib.Code;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.Field;
import org.jf.dexlib.IndexedItem;
import org.jf.dexlib.code.Format.ArrayDataPseudoInstruction;
import org.jf.dexlib.code.Format.PackedSwitchDataPseudoInstruction;
import org.jf.dexlib.code.Format.SparseSwitchDataPseudoInstruction;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Code.Format.ArrayDataPseudoInstruction;
import org.jf.dexlib.Code.Format.PackedSwitchDataPseudoInstruction;
import org.jf.dexlib.Code.Format.SparseSwitchDataPseudoInstruction;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
public class InstructionField implements Field<InstructionField> {
private Instruction instruction;

View File

@ -26,9 +26,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code;
package org.jf.dexlib.Code;
import org.jf.dexlib.code.Format.Format;
import org.jf.dexlib.Code.Format.Format;
import java.util.ArrayList;
import java.util.HashMap;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.code;
package org.jf.dexlib.Code;
import org.jf.dexlib.*;

View File

@ -28,10 +28,10 @@
package org.jf.dexlib;
import org.jf.dexlib.code.InstructionField;
import org.jf.dexlib.code.Opcode;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Code.InstructionField;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
import java.util.ArrayList;
import java.util.HashMap;

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
public abstract class CompositeField<T extends CompositeField<T>> implements Field<T> {

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.ByteField;
import org.jf.dexlib.CompositeField;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.ByteField;
import org.jf.dexlib.CompositeField;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.Field;

View File

@ -26,10 +26,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.Input;
public abstract class DebugInstructionFactory {
public static DebugInstruction readDebugInstruction(DexFile dexFile, Input in) {

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.ByteField;
import org.jf.dexlib.CompositeField;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.ByteField;
import org.jf.dexlib.CompositeField;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.*;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.ByteField;
import org.jf.dexlib.CompositeField;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.*;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.ByteField;
import org.jf.dexlib.CompositeField;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.ByteField;
import org.jf.dexlib.CompositeField;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.*;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.debug;
package org.jf.dexlib.Debug;
import org.jf.dexlib.*;

View File

@ -28,11 +28,11 @@
package org.jf.dexlib;
import org.jf.dexlib.debug.DebugInstruction;
import org.jf.dexlib.debug.DebugInstructionFactory;
import org.jf.dexlib.debug.EndSequence;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Debug.DebugInstruction;
import org.jf.dexlib.Debug.DebugInstructionFactory;
import org.jf.dexlib.Debug.EndSequence;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
import java.util.ArrayList;
import java.util.List;

View File

@ -28,10 +28,10 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.ByteArrayInput;
import org.jf.dexlib.util.FileUtils;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.ByteArrayInput;
import org.jf.dexlib.Util.FileUtils;
import org.jf.dexlib.Util.Input;
import java.io.File;
import java.security.DigestException;
@ -197,15 +197,12 @@ public class DexFile
offset = HeaderItemSection.place(offset);
for (IndexedSection indexedSection: indexedSections) {
indexedSection.unplace();
offset = indexedSection.place(offset);
}
dataOffset = offset;
for (OffsettedSection offsettedSection: offsettedSections) {
offsettedSection.unplace();
offset = offsettedSection.place(offset);
}

View File

@ -30,8 +30,6 @@ package org.jf.dexlib;
import org.jf.dexlib.EncodedValue.ArrayEncodedValueSubField;
import org.jf.dexlib.EncodedValue.EncodedValue;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import java.util.ArrayList;

View File

@ -28,8 +28,8 @@
package org.jf.dexlib.EncodedValue;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
public class BoolEncodedValueSubField
extends SimpleEncodedValueSubField<Boolean, BoolEncodedValueSubField>

View File

@ -28,8 +28,8 @@
package org.jf.dexlib.EncodedValue;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
public class ByteEncodedValueSubField
extends SimpleEncodedValueSubField<Byte, ByteEncodedValueSubField>

View File

@ -28,9 +28,9 @@
package org.jf.dexlib.EncodedValue;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.EncodedValueUtils;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.EncodedValueUtils;
import org.jf.dexlib.Util.Input;
public class CharEncodedValueSubField
extends SimpleEncodedValueSubField<Character, CharEncodedValueSubField>

View File

@ -28,9 +28,9 @@
package org.jf.dexlib.EncodedValue;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.EncodedValueUtils;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.EncodedValueUtils;
import org.jf.dexlib.Util.Input;
public class DoubleEncodedValueSubField
extends SimpleEncodedValueSubField<Double, DoubleEncodedValueSubField>

View File

@ -29,9 +29,9 @@
package org.jf.dexlib.EncodedValue;
import org.jf.dexlib.*;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.EncodedValueUtils;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.EncodedValueUtils;
import org.jf.dexlib.Util.Input;
public class EncodedIndexedItemReference<T extends IndexedItem<T>>
implements EncodedValueSubField<EncodedIndexedItemReference<T>> {

View File

@ -31,8 +31,8 @@ package org.jf.dexlib.EncodedValue;
import org.jf.dexlib.CompositeField;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.Field;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
public class EncodedValue extends CompositeField<EncodedValue> {
private class ValueTypeArgField implements Field<ValueTypeArgField> {

View File

@ -28,9 +28,9 @@
package org.jf.dexlib.EncodedValue;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.EncodedValueUtils;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.EncodedValueUtils;
import org.jf.dexlib.Util.Input;
public class FloatEncodedValueSubField
extends SimpleEncodedValueSubField<Float, FloatEncodedValueSubField>

View File

@ -28,9 +28,9 @@
package org.jf.dexlib.EncodedValue;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.EncodedValueUtils;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.EncodedValueUtils;
import org.jf.dexlib.Util.Input;
public class IntEncodedValueSubField
extends SimpleEncodedValueSubField<Integer, IntEncodedValueSubField>

View File

@ -28,9 +28,9 @@
package org.jf.dexlib.EncodedValue;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.EncodedValueUtils;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.EncodedValueUtils;
import org.jf.dexlib.Util.Input;
public class LongEncodedValueSubField
extends SimpleEncodedValueSubField<Long, LongEncodedValueSubField>

View File

@ -28,8 +28,8 @@
package org.jf.dexlib.EncodedValue;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
public class NullEncodedValueSubField
extends SimpleEncodedValueSubField<Object, NullEncodedValueSubField>

View File

@ -28,9 +28,9 @@
package org.jf.dexlib.EncodedValue;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.EncodedValueUtils;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.EncodedValueUtils;
import org.jf.dexlib.Util.Input;
public class ShortEncodedValueSubField
extends SimpleEncodedValueSubField<Short, ShortEncodedValueSubField>

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
public interface Field<T extends Field> {
public void writeTo(AnnotatedOutput out);

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
import java.util.ArrayList;

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
public class FixedSizeByteArrayField implements Field<FixedSizeByteArrayField> {
protected byte[] value;

View File

@ -28,7 +28,7 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.Util.AnnotatedOutput;
import java.io.UnsupportedEncodingException;

View File

@ -28,7 +28,7 @@
package org.jf.dexlib;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.Input;
import java.util.Collections;

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.util.Output;
import org.jf.dexlib.Util.Input;
import org.jf.dexlib.Util.Output;
public class IntegerField extends CachedIntegerValueField<IntegerField> {
public IntegerField(String fieldName) {

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
public abstract class Item<T extends Item> {
protected int offset = -1;
@ -44,10 +44,6 @@ public abstract class Item<T extends Item> {
return offset > -1;
}
public void unplace() {
offset = -1;
}
public int place(int index, int offset) {
offset = alignOffset(offset);

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
public abstract class ItemReference<T extends Item<T>, S extends ItemReference<T,S>> implements Field<S> {
private T item = null;

View File

@ -28,9 +28,9 @@
package org.jf.dexlib;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.util.Leb128Utils;
import org.jf.dexlib.util.Output;
import org.jf.dexlib.Util.Input;
import org.jf.dexlib.Util.Leb128Utils;
import org.jf.dexlib.Util.Output;
public class Leb128Field extends CachedIntegerValueField {
public Leb128Field(String fieldName) {

View File

@ -28,9 +28,9 @@
package org.jf.dexlib;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.util.Leb128Utils;
import org.jf.dexlib.util.Output;
import org.jf.dexlib.Util.Input;
import org.jf.dexlib.Util.Leb128Utils;
import org.jf.dexlib.Util.Output;
public class Leb128p1Field extends CachedIntegerValueField {
public Leb128p1Field(String fieldName) {

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
import java.util.ArrayList;

View File

@ -28,9 +28,6 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

View File

@ -68,10 +68,8 @@ public class MethodIdItem extends IndexedItem<MethodIdItem> {
public String getMethodString() {
if (cachedMethodString == null) {
String parentClass = classTypeReferenceField.getReference().getTypeDescriptor();
//strip the leading L and trailing ;
parentClass = parentClass.substring(1, parentClass.length() - 1);
cachedMethodString = parentClass + methodNameReferenceField.getReference().getStringValue() +
cachedMethodString = parentClass + "->" + methodNameReferenceField.getReference().getStringValue() +
prototypeReferenceField.getReference().getPrototypeString();
}
return cachedMethodString;

View File

@ -28,9 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.ByteArray;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
public class NullTerminatedByteArrayField implements Field<NullTerminatedByteArrayField> {
protected byte[] value;

View File

@ -28,7 +28,7 @@
package org.jf.dexlib;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.Input;
import java.util.HashMap;
import java.util.Collections;

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.Input;
import java.util.ArrayList;
import java.util.HashMap;
@ -74,12 +74,6 @@ public abstract class Section<T extends Item> {
return offset;
}
public void unplace() {
for (Item item: items) {
item.unplace();
}
}
public void writeTo(AnnotatedOutput out) {
for (int i = 0; i < size(); i++) {
T item = items.get(i);

View File

@ -28,7 +28,7 @@
package org.jf.dexlib;
import org.jf.dexlib.util.AnnotatedOutput;
import org.jf.dexlib.Util.AnnotatedOutput;
public abstract class SectionHeaderInfo extends CompositeField<SectionHeaderInfo> {
private final String sectionName;

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.util.Output;
import org.jf.dexlib.Util.Input;
import org.jf.dexlib.Util.Output;
public class ShortIntegerField extends CachedIntegerValueField {
public ShortIntegerField(String fieldName) {

View File

@ -28,9 +28,9 @@
package org.jf.dexlib;
import org.jf.dexlib.util.Input;
import org.jf.dexlib.util.Leb128Utils;
import org.jf.dexlib.util.Output;
import org.jf.dexlib.Util.Input;
import org.jf.dexlib.Util.Leb128Utils;
import org.jf.dexlib.Util.Output;
public class SignedLeb128Field extends CachedIntegerValueField {
public SignedLeb128Field(String fieldName) {

View File

@ -28,8 +28,8 @@
package org.jf.dexlib;
import org.jf.dexlib.util.ByteArray;
import org.jf.dexlib.util.Utf8Utils;
import org.jf.dexlib.Util.ByteArray;
import org.jf.dexlib.Util.Utf8Utils;
public class StringDataItem extends OffsettedItem<StringDataItem> implements Comparable<StringDataItem> {
private String value = null;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
import java.util.ArrayList;
import java.util.HashMap;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
/**
* Interface for a binary output destination that may be augmented

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
import java.io.DataInputStream;
import java.io.IOException;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
import java.io.IOException;
import java.io.Writer;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
/**
* Implementation of {@link Input} which reads the data from a
@ -142,20 +142,14 @@ public class ByteArrayInput
cursor = end;
/**
* TODO: is there a faster/better way to do this?
*/
return (long)((data[readAt] & 0xff) +
((data[readAt + 1] & 0xff) << 8) +
((data[readAt + 2] & 0xff) << 16) +
((data[readAt + 3] & 0xff) << 24))
+
((long)((data[readAt + 4] & 0xff)+
((data[readAt + 5] & 0xff) << 8) +
((data[readAt + 6] & 0xff) << 16) +
((data[readAt + 7] & 0xff) << 24)) << 32);
return (data[readAt] & 0xffL) |
((data[readAt + 1] & 0xffL) << 8) |
((data[readAt + 2] & 0xffL) << 16) |
((data[readAt + 3] & 0xffL) << 24) |
((data[readAt + 4] & 0xffL) << 32) |
((data[readAt + 5] & 0xffL) << 40) |
((data[readAt + 6] & 0xffL) << 48) |
((data[readAt + 7] & 0xffL) << 58);
}
/** {@inheritDoc} */

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
import java.util.ArrayList;

View File

@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
import org.jf.dexlib.DebugInfoItem;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.StringIdItem;
import org.jf.dexlib.TypeIdItem;
import org.jf.dexlib.debug.*;
import org.jf.dexlib.Debug.*;
import java.util.ArrayList;
import java.util.List;

View File

@ -26,12 +26,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
import org.jf.dexlib.StringIdItem;
import org.jf.dexlib.TypeIdItem;
import org.jf.dexlib.DebugInfoItem;
import org.jf.dexlib.debug.*;
import org.jf.dexlib.Debug.*;
public class DebugInfoDecoder {
private final DebugInfoItem debugItem;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
public class EncodedValueUtils {
public static byte getRequiredBytesForSignedIntegralValue(long value) {

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
import java.io.PrintStream;
import java.io.PrintWriter;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
import java.io.File;
import java.io.FileInputStream;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
/**
* Utilities for formatting numbers as hexadecimal.

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
import java.io.FilterWriter;
import java.io.IOException;

View File

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
/**
* Interface for a source for binary input. This is similar to

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jf.dexlib.util;
package org.jf.dexlib.Util;
/**
* LEB128 (little-endian base 128) utilities.

Some files were not shown because too many files have changed in this diff Show More