public class ClassFile extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ClassFile.UtfPool |
static class |
ClassFile.UtfStringConstant |
Modifier and Type | Field and Description |
---|---|
String |
_fields |
Vector |
allClasses |
int |
byte_reduction |
static int |
CONSTANT_Class |
static int |
CONSTANT_Double |
static int |
CONSTANT_Fieldref |
static int |
CONSTANT_Float |
static int |
CONSTANT_Integer |
static int |
CONSTANT_InterfaceMethodref |
static int |
CONSTANT_Long |
static int |
CONSTANT_Methodref |
static int |
CONSTANT_NameAndType |
static int |
CONSTANT_String |
static int |
CONSTANT_Utf8 |
ByteArray |
data |
int |
entries |
byte[] |
modified |
String |
name |
int |
percentage_change |
ClassFile.UtfPool |
pool |
int |
size |
Constructor and Description |
---|
ClassFile()
This constructor is used when gathering and processing a set of class files.
|
ClassFile(ByteArray data)
This constructor is used for each individual class file.
|
Modifier and Type | Method and Description |
---|---|
void |
add(ClassFile cf) |
static ClassFile.UtfStringConstant |
add(Hashtable table,
ClassFile.UtfStringConstant value) |
void |
addToPool(ByteArray data) |
void |
addToPool(File f)
Add a class file to the pool.
|
byte[] |
convertBack(ClassFile.UtfPool pool) |
boolean |
convertFiles(Handle h)
Convert the files in the vector to byte arrays containg the compressed class file.
|
static void |
doDirectory(File f,
ClassFile classes,
ClassFile.UtfPool pool) |
Vector |
getAllStrings(Hashtable ht) |
String |
getStats() |
ClassFile.UtfStringConstant |
getUtfString(int offset) |
static void |
main(String[] args) |
boolean |
modify(Hashtable ht) |
String |
toString()
Return a String representation of this object.
|
public ByteArray data
public String name
public byte[] modified
public static final int CONSTANT_Utf8
public static final int CONSTANT_Integer
public static final int CONSTANT_Float
public static final int CONSTANT_Long
public static final int CONSTANT_Double
public static final int CONSTANT_Class
public static final int CONSTANT_String
public static final int CONSTANT_Fieldref
public static final int CONSTANT_Methodref
public static final int CONSTANT_InterfaceMethodref
public static final int CONSTANT_NameAndType
public ClassFile.UtfPool pool
public Vector allClasses
public int size
public int entries
public int byte_reduction
public int percentage_change
public String _fields
public ClassFile()
public ClassFile(ByteArray data)
public void addToPool(File f) throws IOException
IOException
public void addToPool(ByteArray data)
public boolean convertFiles(Handle h)
h
- A handle to monitor and control the progresspublic String getStats()
public void add(ClassFile cf)
public boolean modify(Hashtable ht)
public byte[] convertBack(ClassFile.UtfPool pool)
public ClassFile.UtfStringConstant getUtfString(int offset)
public static ClassFile.UtfStringConstant add(Hashtable table, ClassFile.UtfStringConstant value)
public String toString()
Object
public static void doDirectory(File f, ClassFile classes, ClassFile.UtfPool pool) throws IOException
IOException
public static void main(String[] args) throws IOException
IOException