public String toString() { return Jimple.NEW + " " + type.toString(); }
private boolean isStringBuffer(Type t) { if (!(t instanceof RefType)) { return false; } RefType rt = (RefType) t; String s = rt.toString(); if (s.equals("java.lang.StringBuffer")) { return true; } if (s.equals("java.lang.StringBuilder")) { return true; } return false; }
public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("new " + type.toString() + "("); if (argBoxes != null) { for (int i = 0; i < argBoxes.length; i++) { if (i != 0) { buffer.append(", "); } buffer.append(argBoxes[i].getValue().toString()); } } buffer.append(")"); return buffer.toString(); }
public boolean validateMatchesForField(SparkField field) { if (field instanceof ArrayElement) { return true; } SootField sootField = (SootField) field; String fieldTypeStr = sootField.getDeclaringClass().getType().toString(); for (String typeName : importantTypes) { if (fieldTypeStr.equals(typeName)) { return true; } } return false; }
public boolean validFromBothEnds(SparkField field) { if (allNotBothEnds) { return false; } if (field instanceof SootField) { SootField sootField = (SootField) field; String fieldTypeStr = sootField.getDeclaringClass().getType().toString(); for (String typeName : notBothEndsTypes) { if (fieldTypeStr.equals(typeName)) { return false; } } } return true; }
@Override public int compare(T o1, T o2) { RefType t1 = baseType(o1); RefType t2 = baseType(o2); if (t1.equals(t2)) { // There should never be both AnySubType(t) and // t in a ThrowableSet, but if it happens, put // AnySubType(t) first: if (o1 instanceof AnySubType) { if (o2 instanceof AnySubType) { return 0; } else { return -1; } } else if (o2 instanceof AnySubType) { return 1; } else { return 0; } } else { return t1.toString().compareTo(t2.toString()); } }
throw new RuntimeException("Unsupported type " + reflikeType.getClass().getName()); String typeName = baseType.toString(); int start = 0; int end = typeName.length();
public void caseNewExpr(NewExpr v) { emit("new " + slashify(v.getBaseType().toString()), 1); }
RefType exclusionBase = excludedType.getBase(); if ((eHasNoHierarchy && exclusionBase.equals(e)) || (!eHasNoHierarchy && hierarchy.canStoreType(e, exclusionBase))) { throw new AlreadyHasExclusionsException("ThrowableSet.add(RefType): adding" + e.toString() + " to the set [ " + this.toString() + "] where " + exclusionBase.toString() + " is excluded.");
public boolean validateMatchesForField(SparkField field) { if (field instanceof ArrayElement) { return true; } SootField sootField = (SootField) field; RefType declaringType = sootField.getDeclaringClass().getType(); String declaringTypeStr = declaringType.toString(); String topLevel = Util.topLevelTypeString(declaringTypeStr); RefType refType; if (Scene.v().containsType(topLevel)) { refType = Scene.v().getRefType(topLevel); } else { refType = null; } for (RefType checkedType : typesToCheck) { if (manager.castNeverFails(checkedType, refType)) { // System.err.println("validate " + declaringTypeStr); return true; } } if (newTypeOnQuery == null) { newTypeOnQuery = declaringTypeStr; } return false; }
public void caseNewInvokeExpr(NewInvokeExpr v) { emit("new " + slashify(v.getBaseType().toString()), 1); emit("dup", 1); SootMethodRef m = v.getMethodRef(); // emitValue(v.getBase()); // already on the stack for (int i = 0; i < m.parameterTypes().size(); i++) { emitValue(v.getArg(i)); } emit("invokespecial " + slashify(m.declaringClass().getName()) + "/" + m.name() + jasminDescriptorOf(m), -(argCountOf(m) + 1) + sizeOfType(m.returnType())); }
+ "] where " + exclusionBase.toString() + " is excluded.");
((soot.RefType) Util.getSootType(superType.outer())).toString(), superType.name(), Util.getModifier(superType.flags()));
((soot.RefType) Util.getSootType(superType.outer())).toString(), superType.name(), Util.getModifier(superType.flags()));
public String toString() { return Jimple.NEW + " " + type.toString(); }
public String toString() { return Jimple.NEW + " " + type.toString(); }
public int compare(Object o1, Object o2) { RefType t1 = baseType(o1); RefType t2 = baseType(o2); if (t1.equals(t2)) { // There should never be both AnySubType(t) and // t in a ThrowableSet, but if it happens, put // AnySubType(t) first: if (o1 instanceof AnySubType) { if (o2 instanceof AnySubType) { return 0; } else { return -1; } } else if (o2 instanceof AnySubType) { return 1; } else { return 0; } } else { return t1.toString().compareTo(t2.toString()); } }