/** Returns a textual (and quoted as needed) representation of this type for serialization, e.g. to .jimple format */ public String toQuotedString() { return toString(); }
@Override public String toString() { return type.toString() + "(" + id + ")"; }
public String getTypeString() { return type.toString(); }
public void print(PrintStream out) { for (int i = 0; i < types.length; i++) { out.println(i + ": " + types[i].toString()); } } }
public void print(PrintStream out) { for (int i = types.length - 1; i >= 0; i--) { out.println(i + ": " + types[i].toString()); } if (types.length == 0) { out.println("<empty>"); } } }
public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append(baseType.toString()); for (int i = 0; i < numDimensions; i++) { buffer.append("[]"); } return buffer.toString(); }
@Override public String toString() { return String.format("Existing field %s does not match expected field type %s", existingField.toString(), requestedType.toString()); }
@Override public String toString() { if (isEmptyReg()) { return "the empty reg"; } return "reg(" + number + "):" + type.toString(); }
public String toString() { StringBuffer buffer = new StringBuffer(); Type t = baseType.baseType; buffer.append(Jimple.NEWMULTIARRAY + " (" + t.toString() + ")"); for (ValueBox element : sizeBoxes) { buffer.append("[" + element.getValue().toString() + "]"); } for (int i = 0; i < baseType.numDimensions - sizeBoxes.length; i++) { buffer.append("[]"); } return buffer.toString(); }
public void type(Type t) { handleIndent(); output.append(t.toString()); } }
private void printOutput(List<Unit> unitsBuilt) { if (!output) { return; } out.println(" after as: "); for (Unit uu : unitsBuilt) { out.println( "\t" + uu + "\ttype : " + (uu instanceof AssignStmt ? ((AssignStmt) uu).getLeftOp().getType().toString() : "")); } }
@Override public void caseInstanceOfInst(InstanceOfInst i) { Type checkType = i.getCheckType(); if (checkType instanceof RefType) { emit("instanceof " + slashify(checkType.toString())); } else if (checkType instanceof ArrayType) { emit("instanceof " + jasminDescriptorOf(checkType)); } }
public void outDefinitionStmt(DefinitionStmt s) { // checking casting here because we want to see if the expr // on the right of def stmt is a cast expr not whether it contains a cast expr if (definedLocal != null && s.getRightOp() instanceof CastExpr) { Type castType = ((CastExpr) s.getRightOp()).getCastType(); info.addCastString(definedLocal, castType.toString()); } inDefinitionStmt = false; definedLocal = null; }
private String createStringConstantBinary(polyglot.ast.Binary binary) { // System.out.println("create string binary: type"+binary.type()); String s = null; if (Util.getSootType(binary.type()).toString().equals("java.lang.String")) { // here if type is a string return string constant s = createStringConstant(binary.left()) + createStringConstant(binary.right()); } else { // else eval and return string of the eval result s = binary.constantValue().toString(); } return s; }
public void caseNewArrayExpr(NewArrayExpr v) { Value size = v.getSize(); emitValue(size); if (v.getBaseType() instanceof RefType) { emit("anewarray " + slashify(v.getBaseType().toString()), 0); } else if (v.getBaseType() instanceof ArrayType) { emit("anewarray " + jasminDescriptorOf(v.getBaseType()), 0); } else { emit("newarray " + v.getBaseType().toString(), 0); } }
public void caseInstanceOfExpr(InstanceOfExpr v) { final Type checkType; emitValue(v.getOp()); checkType = v.getCheckType(); if (checkType instanceof RefType) { emit("instanceof " + slashify(checkType.toString()), 0); } else if (checkType instanceof ArrayType) { emit("instanceof " + jasminDescriptorOf(checkType), 0); } }
@Override public void caseNewArrayInst(NewArrayInst i) { if (i.getBaseType() instanceof RefType) { emit("anewarray " + slashify(((RefType) i.getBaseType()).getClassName())); } else if (i.getBaseType() instanceof ArrayType) { emit("anewarray " + jasminDescriptorOf(i.getBaseType())); } else { emit("newarray " + i.getBaseType().toString()); } }
/** * Local Class Decl - Local Inner Class */ private void createLocalClassDecl(polyglot.ast.LocalClassDecl cDecl) { BiMap lcMap = InitialResolver.v().getLocalClassMap(); String name = Util.getSootType(cDecl.decl().type()).toString(); if (!InitialResolver.v().hasClassInnerTag(body.getMethod().getDeclaringClass(), name)) { Util.addInnerClassTag(body.getMethod().getDeclaringClass(), name, null, cDecl.decl().name(), Util.getModifier(cDecl.decl().flags())); } }