/** * Shorten long class names, <em>java/lang/String</em> becomes * <em>String</em>. * * @param str The long class name * @return Compacted class name */ public static final String compactClassName( String str ) { return compactClassName(str, true); }
/** * Shorten long class names, <em>java/lang/String</em> becomes * <em>String</em>. * * @param str The long class name * @return Compacted class name */ public static final String compactClassName( String str ) { return compactClassName(str, true); }
/** * Shorten long class names, <em>java/lang/String</em> becomes * <em>String</em>. * * @param str The long class name * @return Compacted class name */ public static final String compactClassName( String str ) { return compactClassName(str, true); }
/** * Shorten long class names, <em>java/lang/String</em> becomes * <em>java.lang.String</em>, * e.g.. If <em>chopit</em> is <em>true</em> the prefix <em>java.lang</em> * is also removed. * * @param str The long class name * @param chopit Flag that determines whether chopping is executed or not * @return Compacted class name */ public static final String compactClassName( String str, boolean chopit ) { return compactClassName(str, "java.lang.", chopit); }
/** * Shorten long class names, <em>java/lang/String</em> becomes * <em>java.lang.String</em>, * e.g.. If <em>chopit</em> is <em>true</em> the prefix <em>java.lang</em> * is also removed. * * @param str The long class name * @param chopit Flag that determines whether chopping is executed or not * @return Compacted class name */ public static final String compactClassName( String str, boolean chopit ) { return compactClassName(str, "java.lang.", chopit); }
/** * Shorten long class names, <em>java/lang/String</em> becomes * <em>java.lang.String</em>, * e.g.. If <em>chopit</em> is <em>true</em> the prefix <em>java.lang</em> * is also removed. * * @param str The long class name * @param chopit Flag that determines whether chopping is executed or not * @return Compacted class name */ public static final String compactClassName( String str, boolean chopit ) { return compactClassName(str, "java.lang.", chopit); }
/** * @return String representation. */ public final String toString( ConstantPool cp, boolean verbose ) { String str; if (catch_type == 0) { str = "<Any exception>(0)"; } else { str = Utility.compactClassName(cp.getConstantString(catch_type, CONSTANT_Class), false) + (verbose ? "(" + catch_type + ")" : ""); } return start_pc + "\t" + end_pc + "\t" + handler_pc + "\t" + str; }
/** * @return String representation. */ public final String toString( ConstantPool cp, boolean verbose ) { String str; if (catch_type == 0) { str = "<Any exception>(0)"; } else { str = Utility.compactClassName(cp.getConstantString(catch_type, CONSTANT_Class), false) + (verbose ? "(" + catch_type + ")" : ""); } return start_pc + "\t" + end_pc + "\t" + handler_pc + "\t" + str; }
/** * @return String representation. */ public final String toString( ConstantPool cp, boolean verbose ) { String str; if (catch_type == 0) { str = "<Any exception>(0)"; } else { str = Utility.compactClassName(cp.getConstantString(catch_type, CONSTANT_Class), false) + (verbose ? "(" + catch_type + ")" : ""); } return start_pc + "\t" + end_pc + "\t" + handler_pc + "\t" + str; }
/** * @return String representation, i.e., a list of thrown exceptions. */ @Override public final String toString() { StringBuilder buf = new StringBuilder(); String str; for (int i = 0; i < number_of_exceptions; i++) { str = constant_pool.getConstantString(exception_index_table[i], Constants.CONSTANT_Class); buf.append(Utility.compactClassName(str, false)); if (i < number_of_exceptions - 1) { buf.append(", "); } } return buf.toString(); }
/** * @return String representation, i.e., a list of thrown exceptions. */ @Override public final String toString() { StringBuilder buf = new StringBuilder(); String str; for (int i = 0; i < number_of_exceptions; i++) { str = constant_pool.getConstantString(exception_index_table[i], Constants.CONSTANT_Class); buf.append(Utility.compactClassName(str, false)); if (i < number_of_exceptions - 1) { buf.append(", "); } } return buf.toString(); }
/** * @return String representation, i.e., a list of thrown exceptions. */ @Override public final String toString() { StringBuffer buf = new StringBuffer(); String str; for (int i = 0; i < number_of_exceptions; i++) { str = constant_pool.getConstantString(exception_index_table[i], Constants.CONSTANT_Class); buf.append(Utility.compactClassName(str, false)); if (i < number_of_exceptions - 1) { buf.append(", "); } } return buf.toString(); }
class_name = Utility.compactClassName(class_name); if (superclass_name_index > 0) { superclass_name = Utility.compactClassName(superclass_name); } else { superclass_name = "java.lang.Object"; for (int i = 0; i < interfaces.length; i++) { String str = constant_pool.getConstantString(interfaces[i], Constants.CONSTANT_Class); interface_names[i] = Utility.compactClassName(str);
/** * @return Resolved string representation */ public final String toString( ConstantPool constant_pool ) { String inner_class_name, outer_class_name, inner_name, access; inner_class_name = constant_pool.getConstantString(inner_class_index, Constants.CONSTANT_Class); inner_class_name = Utility.compactClassName(inner_class_name); if (outer_class_index != 0) { outer_class_name = constant_pool.getConstantString(outer_class_index, Constants.CONSTANT_Class); outer_class_name = Utility.compactClassName(outer_class_name); } else { outer_class_name = "<not a member>"; } if (inner_name_index != 0) { inner_name = ((ConstantUtf8) constant_pool.getConstant(inner_name_index, Constants.CONSTANT_Utf8)).getBytes(); } else { inner_name = "<anonymous>"; } access = Utility.accessToString(inner_access_flags, true); access = access.equals("") ? "" : (access + " "); return "InnerClass:" + access + inner_class_name + "(\"" + outer_class_name + "\", \"" + inner_name + "\")"; }
/** * @return Resolved string representation */ public final String toString( ConstantPool constant_pool ) { String inner_class_name, outer_class_name, inner_name, access; inner_class_name = constant_pool.getConstantString(inner_class_index, Constants.CONSTANT_Class); inner_class_name = Utility.compactClassName(inner_class_name); if (outer_class_index != 0) { outer_class_name = constant_pool.getConstantString(outer_class_index, Constants.CONSTANT_Class); outer_class_name = Utility.compactClassName(outer_class_name); } else { outer_class_name = "<not a member>"; } if (inner_name_index != 0) { inner_name = ((ConstantUtf8) constant_pool.getConstant(inner_name_index, Constants.CONSTANT_Utf8)).getBytes(); } else { inner_name = "<anonymous>"; } access = Utility.accessToString(inner_access_flags, true); access = access.equals("") ? "" : (access + " "); return "InnerClass:" + access + inner_class_name + "(\"" + outer_class_name + "\", \"" + inner_name + "\")"; }
/** * @return Resolved string representation */ public final String toString( ConstantPool constant_pool ) { String inner_class_name, outer_class_name, inner_name, access; inner_class_name = constant_pool.getConstantString(inner_class_index, Constants.CONSTANT_Class); inner_class_name = Utility.compactClassName(inner_class_name); if (outer_class_index != 0) { outer_class_name = constant_pool.getConstantString(outer_class_index, Constants.CONSTANT_Class); outer_class_name = Utility.compactClassName(outer_class_name); } else { outer_class_name = "<not a member>"; } if (inner_name_index != 0) { inner_name = ((ConstantUtf8) constant_pool.getConstant(inner_name_index, Constants.CONSTANT_Utf8)).getBytes(); } else { inner_name = "<anonymous>"; } access = Utility.accessToString(inner_access_flags, true); access = access.equals("") ? "" : (access + " "); return "InnerClass:" + access + inner_class_name + "(\"" + outer_class_name + "\", \"" + inner_name + "\")"; }
static String getClassName(final ConstantPool constant_pool, final int index) { Constant c = constant_pool.getConstant(index, Const.CONSTANT_Class); int i = ((ConstantClass) c).getNameIndex(); // Finally get the string from the constant pool c = constant_pool.getConstant(i, Const.CONSTANT_Utf8); String name = ((ConstantUtf8) c).getBytes(); return compactClassName(name); }
i = ((ConstantClass) c).getNameIndex(); c = getConstant(i, Constants.CONSTANT_Utf8); str = Utility.compactClassName(((ConstantUtf8) c).getBytes()); break; case Constants.CONSTANT_String:
i = ((ConstantClass) c).getNameIndex(); c = getConstant(i, Constants.CONSTANT_Utf8); str = Utility.compactClassName(((ConstantUtf8) c).getBytes(), false); break; case Constants.CONSTANT_String:
i = ((ConstantClass) c).getNameIndex(); c = getConstant(i, Constants.CONSTANT_Utf8); str = Utility.compactClassName(((ConstantUtf8) c).getBytes(), false); break; case Constants.CONSTANT_String: