+ @Override
public Attribute copy(ConstantPool _constant_pool)
{
throw new RuntimeException("Not implemented yet!");
}
+ @Override
public final void dump(DataOutputStream dos) throws IOException
{
super.dump(dos);
this.annotationEntry = annotationEntry;
}
+ @Override
public void dump(DataOutputStream dos) throws IOException
{
dos.writeByte(type); // u1 type of value (ANNOTATION == '@')
annotationEntry.dump(dos);
}
+ @Override
public String stringifyValue()
{
StringBuffer sb = new StringBuffer();
return sb.toString();
}
+ @Override
public String toString()
{
return stringifyValue();
// For array types, this is the array
private ElementValue[] evalues;
+ @Override
public String toString()
{
StringBuffer sb = new StringBuffer();
this.evalues = datums;
}
+ @Override
public void dump(DataOutputStream dos) throws IOException
{
dos.writeByte(type); // u1 type of value (ARRAY == '[')
}
}
+ @Override
public String stringifyValue()
{
StringBuffer sb = new StringBuffer();
*
* @return shallow copy of this attribute
*/
+ @Override
public Object clone()
{
Object o = null;
/**
* @return attribute name.
*/
+ @Override
public String toString()
{
return Constants.ATTRIBUTE_NAMES[tag];
+ @Override
public String stringifyValue()
{
ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(idx,
return cu8.getBytes();
}
+ @Override
public void dump(DataOutputStream dos) throws IOException
{
dos.writeByte(type); // u1 kind of value
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(max_stack);
/**
* @return String representation of code chunk.
*/
+ @Override
public final String toString() {
return toString(true);
}
*
* @param _constant_pool the constant pool to duplicate
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
Code c = (Code) clone();
if (code != null) {
/**
* @return String representation.
*/
+ @Override
public final String toString() {
return "CodeException(start_pc = " + start_pc + ", end_pc = " + end_pc + ", handler_pc = "
+ handler_pc + ", catch_type = " + catch_type + ")";
private static final long serialVersionUID = 2827409182154809454L;
private static BCELComparator _cmp = new BCELComparator() {
+ @Override
public boolean equals( Object o1, Object o2 ) {
Constant THIS = (Constant) o1;
Constant THAT = (Constant) o2;
}
+ @Override
public int hashCode( Object o ) {
Constant THIS = (Constant) o;
return THIS.toString().hashCode();
/**
* @return String representation.
*/
+ @Override
public String toString() {
return Constants.CONSTANT_NAMES[tag] + "[" + tag + "]";
}
+ @Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
*
* @see java.lang.Object#equals(java.lang.Object)
*/
+ @Override
public boolean equals( Object obj ) {
return _cmp.equals(this, obj);
}
*
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
return _cmp.hashCode(this);
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
file.writeByte(tag);
file.writeShort(class_index);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
return super.toString() + "(class_index = " + class_index + ", name_and_type_index = "
+ name_and_type_index + ")";
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
file.writeByte(tag);
file.writeShort(name_index);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
return super.toString() + "(name_index = " + name_index + ")";
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
file.writeByte(tag);
file.writeDouble(bytes);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
return super.toString() + "(bytes = " + bytes + ")";
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
file.writeByte(tag);
file.writeFloat(bytes);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
return super.toString() + "(bytes = " + bytes + ")";
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
file.writeByte(tag);
file.writeInt(bytes);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
return super.toString() + "(bytes = " + bytes + ")";
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
file.writeByte(tag);
file.writeLong(bytes);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
return super.toString() + "(bytes = " + bytes + ")";
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
file.writeByte(tag);
file.writeShort(name_index);
/**
* @return String representation
*/
+ @Override
public final String toString() {
return super.toString() + "(name_index = " + name_index + ", signature_index = "
+ signature_index + ")";
/**
* @return String representation.
*/
+ @Override
public String toString() {
StringBuffer buf = new StringBuffer();
for (int i = 1; i < constant_pool_count; i++) {
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
file.writeByte(tag);
file.writeShort(string_index);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
return super.toString() + "(string_index = " + string_index + ")";
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
file.writeByte(tag);
file.writeUTF(bytes);
/**
* @return String representation
*/
+ @Override
public final String toString() {
return super.toString() + "(\"" + Utility.replace(bytes, "\n", "\\n") + "\")";
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(constantvalue_index);
/**
* @return String representation of constant value.
*/
+ @Override
public final String toString() {
Constant c = constant_pool.getConstant(constantvalue_index);
String buf;
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
ConstantValue c = (ConstantValue) clone();
c.constant_pool = _constant_pool;
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
if (length > 0) {
/**
* @return attribute name
*/
+ @Override
public final String toString() {
return Constants.ATTRIBUTE_NAMES[Constants.ATTR_DEPRECATED];
}
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
Deprecated c = (Deprecated) clone();
if (bytes != null) {
protected ConstantPool cpool;
+ @Override
public String toString()
{
return stringifyValue();
methodIndex = methodIdx;
}
+ @Override
public Attribute copy(ConstantPool constant_pool) {
throw new RuntimeException("Not implemented yet!");
// is this next line sufficient?
// return (EnclosingMethod)clone();
}
+ @Override
public final void dump(DataOutputStream file) throws IOException {
super.dump(file);
file.writeShort(classIndex);
this.valueIdx = valueIdx;
}
+ @Override
public void dump(DataOutputStream dos) throws IOException
{
dos.writeByte(type); // u1 type of value (ENUM_CONSTANT == 'e')
dos.writeShort(valueIdx); // u2
}
+ @Override
public String stringifyValue()
{
ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(valueIdx,
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(number_of_exceptions);
/**
* @return String representation, i.e., a list of thrown exceptions.
*/
+ @Override
public final String toString() {
StringBuffer buf = new StringBuffer();
String str;
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
ExceptionTable c = (ExceptionTable) clone();
if (exception_index_table != null) {
private static final long serialVersionUID = 2646214544240375238L;
private static BCELComparator _cmp = new BCELComparator() {
+ @Override
public boolean equals( Object o1, Object o2 ) {
Field THIS = (Field) o1;
Field THAT = (Field) o2;
}
+ @Override
public int hashCode( Object o ) {
Field THIS = (Field) o;
return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
*
* @return String representation of field, including the signature.
*/
+ @Override
public final String toString() {
String name, signature, access; // Short cuts to constant pool
// Get names from constant pool
*
* @see java.lang.Object#equals(java.lang.Object)
*/
+ @Override
public boolean equals( Object obj ) {
return _cmp.equals(this, obj);
}
*
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
return _cmp.hashCode(this);
}
/**
* @return String representation.
*/
+ @Override
public final String toString() {
return "InnerClass(" + inner_class_index + ", " + outer_class_index + ", "
+ inner_name_index + ", " + inner_access_flags + ")";
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(number_of_classes);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
StringBuffer buf = new StringBuffer();
for (int i = 0; i < number_of_classes; i++) {
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
InnerClasses c = (InnerClasses) clone();
c.inner_classes = new InnerClass[number_of_classes];
private static BCELComparator _cmp = new BCELComparator() {
+ @Override
public boolean equals( Object o1, Object o2 ) {
JavaClass THIS = (JavaClass) o1;
JavaClass THAT = (JavaClass) o2;
}
+ @Override
public int hashCode( Object o ) {
JavaClass THIS = (JavaClass) o;
return THIS.getClassName().hashCode();
/**
* @return String representing class contents.
*/
+ @Override
public String toString() {
String access = Utility.accessToString(access_flags, true);
access = access.equals("") ? "" : (access + " ");
*
* @see java.lang.Object#equals(java.lang.Object)
*/
+ @Override
public boolean equals( Object obj ) {
return _cmp.equals(this, obj);
}
* Return the natural ordering of two JavaClasses.
* This ordering is based on the class name
*/
+ @Override
public int compareTo( Object obj ) {
return getClassName().compareTo(((JavaClass) obj).getClassName());
}
*
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
return _cmp.hashCode(this);
}
/**
* @return String representation
*/
+ @Override
public final String toString() {
return "LineNumber(" + start_pc + ", " + line_number + ")";
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(line_number_table_length);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
StringBuffer buf = new StringBuffer();
StringBuffer line = new StringBuffer();
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
LineNumberTable c = (LineNumberTable) clone();
c.line_number_table = new LineNumber[line_number_table_length];
/**
* @return string representation.
*/
+ @Override
public final String toString() {
String name = getName(), signature = Utility.signatureToString(getSignature());
return "LocalVariable(start_pc = " + start_pc + ", length = " + length + ", index = "
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(local_variable_table_length);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
StringBuffer buf = new StringBuffer();
for (int i = 0; i < local_variable_table_length; i++) {
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
LocalVariableTable c = (LocalVariableTable) clone();
c.local_variable_table = new LocalVariable[local_variable_table_length];
local_variable_type_table[i] = new LocalVariable(dis, cpool);
}
+ @Override
public final void dump(DataOutputStream file) throws IOException
{
super.dump(file);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
StringBuffer buf = new StringBuffer("");
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy(ConstantPool constant_pool) {
LocalVariableTypeTable c = (LocalVariableTypeTable)clone();
private static final long serialVersionUID = -7447828891136739513L;
private static BCELComparator _cmp = new BCELComparator() {
+ @Override
public boolean equals( Object o1, Object o2 ) {
Method THIS = (Method) o1;
Method THAT = (Method) o2;
}
+ @Override
public int hashCode( Object o ) {
Method THIS = (Method) o;
return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
*
* @return String representation of the method.
*/
+ @Override
public final String toString() {
ConstantUtf8 c;
String name, signature, access; // Short cuts to constant pool
*
* @see java.lang.Object#equals(java.lang.Object)
*/
+ @Override
public boolean equals( Object obj ) {
return _cmp.equals(this, obj);
}
*
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
return _cmp.hashCode(this);
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(pmg_index);
/**
* @return String representation
*/
+ @Override
public final String toString() {
return "PMGClass(" + getPMGName() + ", " + getPMGClassName() + ")";
}
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
return (PMGClass) clone();
}
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy(ConstantPool constant_pool)
{
Annotations c = (Annotations) clone();
return c;
}
+ @Override
public final void dump(DataOutputStream dos) throws IOException
{
super.dump(dos);
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool constant_pool ) {
Annotations c = (Annotations) clone();
return c;
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy(ConstantPool constant_pool)
{
Annotations c = (Annotations) clone();
return c;
}
+ @Override
public final void dump(DataOutputStream dos) throws IOException
{
super.dump(dos);
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool constant_pool ) {
Annotations c = (Annotations) clone();
return c;
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(signature_index);
/**
* @return String representation
*/
+ @Override
public final String toString() {
String s = getSignature();
return "Signature(" + s + ")";
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
return (Signature) clone();
}
}
+ @Override
public String toString()
{
return stringifyValue();
}
// Whatever kind of value it is, return it as a string
+ @Override
public String stringifyValue()
{
switch (type)
}
}
+ @Override
public void dump(DataOutputStream dos) throws IOException
{
dos.writeByte(type); // u1 kind of value
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(sourcefile_index);
/**
* @return String representation
*/
+ @Override
public final String toString() {
return "SourceFile(" + getSourceFileName() + ")";
}
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
return (SourceFile) clone();
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(map_length);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
StringBuffer buf = new StringBuffer("StackMap(");
for (int i = 0; i < map_length; i++) {
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
StackMap c = (StackMap) clone();
c.map = new StackMapEntry[map_length];
/**
* @return String representation.
*/
+ @Override
public final String toString() {
StringBuffer buf = new StringBuffer(64);
buf.append("(offset=").append(byte_code_offset);
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
file.writeShort(map_length);
/**
* @return String representation.
*/
+ @Override
public final String toString() {
StringBuffer buf = new StringBuffer("StackMapTable(");
for (int i = 0; i < map_length; i++) {
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
StackMapTable c = (StackMapTable) clone();
c.map = new StackMapTableEntry[map_length];
/**
* @return String representation.
*/
+ @Override
public final String toString() {
StringBuffer buf = new StringBuffer(64);
buf.append("(");
/**
* @return String representation
*/
+ @Override
public final String toString() {
return "(type=" + Constants.ITEM_NAMES[type] + printIndex() + ")";
}
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
if (length > 0) {
/**
* @return String representation.
*/
+ @Override
public final String toString() {
StringBuffer buf = new StringBuffer("Synthetic");
if (length > 0) {
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
Synthetic c = (Synthetic) clone();
if (bytes != null) {
* @param file Output file stream
* @throws IOException
*/
+ @Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
if (length > 0) {
/**
* @return name of attribute.
*/
+ @Override
public final String getName() {
return name;
}
/**
* @return String representation.
*/
+ @Override
public final String toString() {
if (length == 0 || bytes == null) {
return "(Unknown attribute " + name + ")";
/**
* @return deep copy of this attribute
*/
+ @Override
public Attribute copy( ConstantPool _constant_pool ) {
Unknown c = (Unknown) clone();
if (bytes != null) {
private static ThreadLocal consumed_chars = new ThreadLocal() {
+ @Override
protected Object initialValue() {
return new Integer(0);
}