@Override public String toString() { return super.toString() + " " + field; } }
public String toPlainString() { return super.toString(); }
public String getGenericParametersAsString() { if (getTypeCategory() != GenericUtilities.TypeCategory.PARAMETERIZED) { throw new IllegalStateException(toString() + " doesn't have generic parameters"); } String baseStringValue = super.toString(); String fullStringValue = toString(); return fullStringValue.substring(baseStringValue.length()); } }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append("<exception:"); boolean first = true; for (ExceptionSet.ThrownExceptionIterator i = exceptionSet.iterator(); i.hasNext();) { if (first) { first = false; } else { buf.append(','); } buf.append(i.next().toString()); } buf.append(">"); return buf.toString(); } }
/** * Checks to see if the exception set is a singleton set containing just the * named exception * * @param exceptionName * (in dotted format) * @return true if it is */ public boolean isSingleton(String exceptionName) { if (size != 1) { return false; } ObjectType e = iterator().next(); return e.toString().equals(exceptionName); }
public static void main(String[] args) { if (args.length != 1) { System.err.println("Usage: " + GenericSignatureParser.class.getName() + " '<method signature>'"); System.exit(1); } GenericSignatureParser parser = new GenericSignatureParser(args[0]); for (Iterator<String> i = parser.parameterSignatureIterator(); i.hasNext();) { String s = i.next(); System.out.println(s); Type t = GenericUtilities.getType(s); System.out.println("-~- " + t); if (t instanceof ObjectType) { System.out.println("-~- " + ((ObjectType) t).toString()); } if (t != null) { System.out.println("-~- " + t.getClass()); } } System.out.println(parser.getNumParameters() + " parameter(s)"); } }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append('{'); boolean first = true; for (ThrownExceptionIterator i = iterator(); i.hasNext();) { ObjectType type = i.next(); if (first) { first = false; } else { buf.append(','); } boolean implicit = !i.isExplicit(); if (implicit) { buf.append('['); } buf.append(type.toString()); if (implicit) { buf.append(']'); } } buf.append('}'); return buf.toString(); }
NEW i = (NEW) ins; ObjectType type = i.getLoadClassType(cpg); System.out.println(formatName(ins) + " " + type.toString()); } else if (ins instanceof LoadInstruction) { LoadInstruction i = (LoadInstruction) ins;
@Override public String toString() { return super.toString() + " " + field; } }
public String toPlainString() { return super.toString(); }
public String getGenericParametersAsString() { if (getTypeCategory() != GenericUtilities.TypeCategory.PARAMETERIZED) { throw new IllegalStateException(toString() + " doesn't have generic parameters"); } String baseStringValue = super.toString(); String fullStringValue = toString(); return fullStringValue.substring(baseStringValue.length()); } }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append("<exception:"); boolean first = true; for (ExceptionSet.ThrownExceptionIterator i = exceptionSet.iterator(); i.hasNext();) { if (first) { first = false; } else { buf.append(','); } buf.append(i.next().toString()); } buf.append(">"); return buf.toString(); } }
/** * Checks to see if the exception set is a singleton set containing just the * named exception * * @param exceptionName * (in dotted format) * @return true if it is */ public boolean isSingleton(String exceptionName) { if (size != 1) { return false; } ObjectType e = iterator().next(); return e.toString().equals(exceptionName); }
public static void main(String[] args) { if (args.length != 1) { System.err.println("Usage: " + GenericSignatureParser.class.getName() + " '<method signature>'"); System.exit(1); } GenericSignatureParser parser = new GenericSignatureParser(args[0]); for (Iterator<String> i = parser.parameterSignatureIterator(); i.hasNext();) { String s = i.next(); System.out.println(s); Type t = GenericUtilities.getType(s); System.out.println("-~- " + t); if (t instanceof ObjectType) { System.out.println("-~- " + ((ObjectType) t).toString()); } if (t != null) { System.out.println("-~- " + t.getClass()); } } System.out.println(parser.getNumParameters() + " parameter(s)"); } }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append('{'); boolean first = true; for (ThrownExceptionIterator i = iterator(); i.hasNext();) { ObjectType type = i.next(); if (first) { first = false; } else { buf.append(','); } boolean implicit = !i.isExplicit(); if (implicit) { buf.append('['); } buf.append(type.toString()); if (implicit) { buf.append(']'); } } buf.append('}'); return buf.toString(); }
NEW i = (NEW) ins; ObjectType type = i.getLoadClassType(cpg); System.out.println(formatName(ins) + " " + type.toString()); } else if (ins instanceof LoadInstruction) { LoadInstruction i = (LoadInstruction) ins;
ObjectType ty = an.getLoadClassType(cg.getConstantPool()); if (ty == null) continue; String type = ty.toString(); if (type.equals("java.lang.String")) { startLoc = i;
&& GenericMethods.isNumber(handles[i + 2].getInstruction()) && (handles[i + 3].getInstruction() instanceof NEWARRAY)) { String newType = ((NEW) handles[i].getInstruction()).getLoadClassType(cg.getConstantPool()).toString(); type = ((NEWARRAY) handles[i + 3].getInstruction()).getType().toString(); logger.debug("Found new array conversion pattern: " + type + "->" + newType + " in " + cg.getClassName() + "." + method.getName());