private static RefType baseType(RefLikeType o) { if (o instanceof AnySubType) { return ((AnySubType) o).getBase(); } else { return (RefType) o; // ClassCastException if o is not a RefType. } }
buf.append(connector); buf.append('('); baseType = ((AnySubType) reflikeType).getBase(); } else { throw new RuntimeException("Unsupported type " + reflikeType.getClass().getName());
private Set<Type> resolveToClasses(Set<Type> rawTypes) { Set<Type> toReturn = new HashSet<Type>(); for (Type ty : rawTypes) { if (ty instanceof AnySubType) { AnySubType anySubType = (AnySubType) ty; RefType base = anySubType.getBase(); Set<SootClass> classRoots; if (base.getSootClass().isInterface()) { classRoots = fh.getAllImplementersOfInterface(base.getSootClass()); } else { classRoots = Collections.singleton(base.getSootClass()); } toReturn.addAll(getTransitiveSubClasses(classRoots)); } else if (ty instanceof ArrayType || ty instanceof RefType) { toReturn.add(ty); } } return toReturn; }
RefType incumbentBase = ((AnySubType) incumbentType).getBase(); if (hierarchy.canStoreType(newType, incumbentBase)) { RefType newBase = ((AnySubType) newType).getBase(); for (Iterator<RefLikeType> j = resultSet.iterator(); j.hasNext();) { RefLikeType incumbentType = j.next(); RefType incumbentBase = ((AnySubType) incumbentType).getBase(); if (newBase == incumbentBase) {
throw new RuntimeException("Unhandled type " + parent); } else if (parent instanceof ArrayType) { Type base = ((AnySubType) child).getBase(); SootClass base = ((AnySubType) child).getBase().getSootClass(); SootClass parentClass = ((RefType) parent).getSootClass(); Deque<SootClass> worklist = new ArrayDeque<SootClass>();
continue; } else if (t instanceof AnySubType) { t = ((AnySubType) t).getBase(); } else if (t instanceof ArrayType) { t = RefType.v("java.lang.Object");
if (exclusion.getBase().equals(catcher)) { return false; } else if (h.canStoreType(catcher, exclusion.getBase())) { return false; RefType thrownBase = ((AnySubType) thrownType).getBase(); if (catcherHasNoHierarchy) { if (thrownBase.equals(catcher) || thrownBase.getClassName().equals("java.lang.Throwable")) {
protected Set<SootMethod> getCallTargetsForType(Type type, NumberedString methodStr, Type receiverType, Set<SootMethod> possibleTargets) { if (!pag.getTypeManager().castNeverFails(type, receiverType)) { return Collections.<SootMethod>emptySet(); } if (type instanceof AnySubType) { AnySubType any = (AnySubType) type; RefType refType = any.getBase(); if (pag.getTypeManager().getFastHierarchy().canStoreType(receiverType, refType) || pag.getTypeManager().getFastHierarchy().canStoreType(refType, receiverType)) { return possibleTargets; } else { return Collections.<SootMethod>emptySet(); } } if (type instanceof ArrayType) { // we'll invoke the java.lang.Object method in this // case // Assert.chk(varNodeType.toString().equals("java.lang.Object")); type = Scene.v().getSootClass("java.lang.Object").getType(); } RefType refType = (RefType) type; SootMethod targetMethod = null; targetMethod = VirtualCalls.v().resolveNonSpecial(refType, methodStr); return Collections.<SootMethod>singleton(targetMethod); }
RefType refType = any.getBase(); if (pag.getTypeManager().getFastHierarchy().canStoreType(receiverType, refType) || pag.getTypeManager().getFastHierarchy().canStoreType(refType, receiverType)) {
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 [ " RefType incumbentBase = ((AnySubType) incumbent).getBase(); if (hierarchy.canStoreType(e, incumbentBase)) { addToMemoizedAdds(e, this);
RefType newBase = e.getBase(); boolean newBaseHasNoHierarchy = hasNoHierarchy(newBase); RefType exclusionBase = excludedType.getBase(); boolean exclusionBaseHasNoHierarchy = !(exclusionBase.getSootClass().hasSuperclass() || // exclusionBase.getSootClass() == objectClass); RefType incumbentBase = ((AnySubType) incumbent).getBase(); if (newBaseHasNoHierarchy) { if (!incumbentBase.equals(newBase)) {
SootClass childClass; if (t instanceof AnySubType) { child = ((AnySubType) t).getBase(); } else if (t instanceof RefType) { child = (RefType)t;
RefType base = ((AnySubType) t).getBase();
private static RefType baseType(Object o) { if (o instanceof AnySubType) { return ((AnySubType) o).getBase(); } else { return (RefType) o; // ClassCastException if o is not a RefType. } }
private static RefType baseType(Object o) { if (o instanceof AnySubType) { return ((AnySubType) o).getBase(); } else { return (RefType) o; // ClassCastException if o is not a RefType. } }
buf.append(connector); buf.append('('); baseType = ((AnySubType)reflikeType).getBase();
buf.append(connector); buf.append('('); baseType = ((AnySubType)reflikeType).getBase();
if( target != null ) targets.add( target ); } else if( t instanceof AnySubType ) { RefType base = ((AnySubType)t).getBase();