Move ExceptionWithContext to Util module

This commit is contained in:
Ben Gruver 2012-10-15 20:23:01 -07:00
parent 70aa787967
commit bf95959ae4
18 changed files with 21 additions and 12 deletions

View File

@ -43,7 +43,7 @@ import org.jf.dexlib.Code.OffsetInstruction;
import org.jf.dexlib.Code.Opcode; import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Debug.DebugInstructionIterator; import org.jf.dexlib.Debug.DebugInstructionIterator;
import org.jf.dexlib.Util.AccessFlags; import org.jf.dexlib.Util.AccessFlags;
import org.jf.dexlib.Util.ExceptionWithContext; import org.jf.util.ExceptionWithContext;
import org.jf.dexlib.Util.SparseIntArray; import org.jf.dexlib.Util.SparseIntArray;
import java.io.IOException; import java.io.IOException;

View File

@ -30,6 +30,7 @@
*/ */
dependencies { dependencies {
compile project(':util')
compile 'com.google.code.findbugs:jsr305:1.3.9' compile 'com.google.code.findbugs:jsr305:1.3.9'
compile 'com.google.collections:google-collections:1.0' compile 'com.google.collections:google-collections:1.0'
} }

View File

@ -30,7 +30,7 @@ package org.jf.dexlib;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import org.jf.dexlib.Util.AnnotatedOutput; import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.ExceptionWithContext; import org.jf.util.ExceptionWithContext;
import org.jf.dexlib.Util.Input; import org.jf.dexlib.Util.Input;
import org.jf.dexlib.Util.ReadOnlyArrayList; import org.jf.dexlib.Util.ReadOnlyArrayList;

View File

@ -30,6 +30,7 @@ package org.jf.dexlib;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import org.jf.dexlib.Util.*; import org.jf.dexlib.Util.*;
import org.jf.util.ExceptionWithContext;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;

View File

@ -32,7 +32,7 @@ import org.jf.dexlib.Code.*;
import org.jf.dexlib.Item; import org.jf.dexlib.Item;
import org.jf.dexlib.ItemType; import org.jf.dexlib.ItemType;
import org.jf.dexlib.MethodIdItem; import org.jf.dexlib.MethodIdItem;
import org.jf.dexlib.Util.ExceptionWithContext; import org.jf.util.ExceptionWithContext;
import java.util.*; import java.util.*;

View File

@ -30,7 +30,7 @@ package org.jf.dexlib.Code.Analysis;
import org.jf.dexlib.*; import org.jf.dexlib.*;
import org.jf.dexlib.Util.AccessFlags; import org.jf.dexlib.Util.AccessFlags;
import org.jf.dexlib.Util.ExceptionWithContext; import org.jf.util.ExceptionWithContext;
import org.jf.dexlib.Util.SparseArray; import org.jf.dexlib.Util.SparseArray;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;

View File

@ -32,7 +32,7 @@ import org.jf.dexlib.*;
import org.jf.dexlib.Code.*; import org.jf.dexlib.Code.*;
import org.jf.dexlib.Code.Format.*; import org.jf.dexlib.Code.Format.*;
import org.jf.dexlib.Util.AccessFlags; import org.jf.dexlib.Util.AccessFlags;
import org.jf.dexlib.Util.ExceptionWithContext; import org.jf.util.ExceptionWithContext;
import org.jf.dexlib.Util.SparseArray; import org.jf.dexlib.Util.SparseArray;
import java.util.BitSet; import java.util.BitSet;

View File

@ -28,7 +28,7 @@
package org.jf.dexlib.Code.Analysis; package org.jf.dexlib.Code.Analysis;
import org.jf.dexlib.Util.ExceptionWithContext; import org.jf.util.ExceptionWithContext;
public class ValidationException extends ExceptionWithContext { public class ValidationException extends ExceptionWithContext {
private int codeAddress; private int codeAddress;

View File

@ -30,8 +30,7 @@ package org.jf.dexlib.Code;
import org.jf.dexlib.Code.Format.*; import org.jf.dexlib.Code.Format.*;
import org.jf.dexlib.DexFile; import org.jf.dexlib.DexFile;
import org.jf.dexlib.Util.ExceptionWithContext; import org.jf.util.ExceptionWithContext;
import org.jf.dexlib.Util.Hex;
public class InstructionIterator { public class InstructionIterator {
public static void IterateInstructions(DexFile dexFile, byte[] insns, ProcessInstructionDelegate delegate) { public static void IterateInstructions(DexFile dexFile, byte[] insns, ProcessInstructionDelegate delegate) {

View File

@ -33,6 +33,7 @@ import org.jf.dexlib.Code.*;
import org.jf.dexlib.Debug.DebugInstructionIterator; import org.jf.dexlib.Debug.DebugInstructionIterator;
import org.jf.dexlib.Debug.DebugOpcode; import org.jf.dexlib.Debug.DebugOpcode;
import org.jf.dexlib.Util.*; import org.jf.dexlib.Util.*;
import org.jf.util.ExceptionWithContext;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -29,6 +29,7 @@
package org.jf.dexlib; package org.jf.dexlib;
import org.jf.dexlib.Util.*; import org.jf.dexlib.Util.*;
import org.jf.util.ExceptionWithContext;
import java.io.*; import java.io.*;
import java.security.DigestException; import java.security.DigestException;

View File

@ -28,7 +28,7 @@
package org.jf.dexlib; package org.jf.dexlib;
import org.jf.dexlib.Util.ExceptionWithContext; import org.jf.util.ExceptionWithContext;
import org.jf.dexlib.Util.Input; import org.jf.dexlib.Util.Input;
public class IndexedSection<T extends Item> extends Section<T> { public class IndexedSection<T extends Item> extends Section<T> {

View File

@ -31,7 +31,7 @@ package org.jf.dexlib;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import org.jf.dexlib.Util.AlignmentUtils; import org.jf.dexlib.Util.AlignmentUtils;
import org.jf.dexlib.Util.AnnotatedOutput; import org.jf.dexlib.Util.AnnotatedOutput;
import org.jf.dexlib.Util.ExceptionWithContext; import org.jf.util.ExceptionWithContext;
import org.jf.dexlib.Util.Input; import org.jf.dexlib.Util.Input;
public abstract class Item<T extends Item> implements Comparable<T> { public abstract class Item<T extends Item> implements Comparable<T> {

View File

@ -28,7 +28,7 @@
package org.jf.dexlib; package org.jf.dexlib;
import org.jf.dexlib.Util.ExceptionWithContext; import org.jf.util.ExceptionWithContext;
import org.jf.dexlib.Util.SparseArray; import org.jf.dexlib.Util.SparseArray;
import java.util.List; import java.util.List;

View File

@ -24,6 +24,8 @@
package org.jf.dexlib.Util; package org.jf.dexlib.Util;
import org.jf.util.ExceptionWithContext;
import java.io.IOException; import java.io.IOException;
import java.io.Writer; import java.io.Writer;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -24,6 +24,8 @@
package org.jf.dexlib.Util; package org.jf.dexlib.Util;
import org.jf.util.ExceptionWithContext;
/** /**
* Implementation of {@link Input} which reads the data from a * Implementation of {@link Input} which reads the data from a
* <code>byte[]</code> instance. * <code>byte[]</code> instance.

View File

@ -24,6 +24,8 @@
package org.jf.dexlib.Util; package org.jf.dexlib.Util;
import org.jf.util.ExceptionWithContext;
import java.util.ArrayList; import java.util.ArrayList;
/** /**

View File

@ -22,7 +22,7 @@
* under the original license * under the original license
*/ */
package org.jf.dexlib.Util; package org.jf.util;
import java.io.PrintStream; import java.io.PrintStream;
import java.io.PrintWriter; import java.io.PrintWriter;