VarNode(PAG pag, Object variable, Type t) { super(pag, t); if (!(t instanceof RefLikeType) || t instanceof AnySubType) { throw new RuntimeException("Attempt to create VarNode of type " + t); } this.variable = variable; pag.getVarNodeNumberer().add(this); setFinishingNumber(++pag.maxFinishNumber); }
FieldRefNode(PAG pag, VarNode base, SparkField field) { super(pag, null); if (field == null) { throw new RuntimeException("null field"); } this.base = base; this.field = field; base.addField(this, field); pag.getFieldRefNodeNumberer().add(this); }
AllocDotField(PAG pag, AllocNode base, SparkField field) { super(pag, null); if (field == null) { throw new RuntimeException("null field"); } this.base = base; this.field = field; base.addField(this, field); pag.getAllocDotFieldNodeNumberer().add(this); }
/** Tells this class if it is being managed by a Scene. */ public void setInScene(boolean isInScene) { this.isInScene = isInScene; Scene.v().getClassNumberer().add(this); }
public Type() { Scene.v().getTypeNumberer().add(this); }
/** Sets the declaring class */ public synchronized void setDeclaringClass(SootClass declClass) { // There is nothing to stop this field from being null except when it actually gets in // other classes such as SootMethodRef (when it tries to resolve the method). However, if // the method is not declared, it should not be trying to resolve it anyways. So I see no // problem with having it able to be null. if (declClass != null) { Scene.v().getMethodNumberer().add(this); } // We could call setDeclared here, however, when SootClass adds a method, it checks isDeclared // and throws an exception if set. So we currently cannot call setDeclared here. declaringClass = declClass; sig = null; }
/** Constructs a JimpleLocal of the given name and type. */ public JimpleLocal(String name, Type type) { setName(name); setType(type); ArrayNumberer<Local> numberer = Scene.v().getLocalNumberer(); if (numberer != null) { numberer.add(this); } }
AllocNode(PAG pag, Object newExpr, Type t, SootMethod m) { super(pag, t); this.method = m; if (t instanceof RefType) { RefType rt = (RefType) t; if (rt.getSootClass().isAbstract()) { boolean usesReflectionLog = new CGOptions(PhaseOptions.v().getPhaseOptions("cg")).reflection_log() != null; if (!usesReflectionLog) { throw new RuntimeException("Attempt to create allocnode with abstract type " + t); } } } this.newExpr = newExpr; if (newExpr instanceof ContextVarNode) { throw new RuntimeException(); } pag.getAllocNodeNumberer().add(this); }
Local val = (Local) value; if (val.getNumber() == 0) { Scene.v().getLocalNumberer().add(val);
public Scene ( Singletons.Global g ) { setReservedNames(); // load soot.class.path system property, if defined String scp = System.getProperty("soot.class.path"); if (scp != null) setSootClassPath(scp); kindNumberer.add( Kind.INVALID ); kindNumberer.add( Kind.STATIC ); kindNumberer.add( Kind.VIRTUAL ); kindNumberer.add( Kind.INTERFACE ); kindNumberer.add( Kind.SPECIAL ); kindNumberer.add( Kind.CLINIT ); kindNumberer.add( Kind.THREAD ); kindNumberer.add( Kind.FINALIZE ); kindNumberer.add( Kind.INVOKE_FINALIZE ); kindNumberer.add( Kind.PRIVILEGED ); kindNumberer.add( Kind.NEWINSTANCE ); addSootBasicClasses(); determineExcludedPackages(); } private void determineExcludedPackages() {
/** Constructs a Soot field with the given name, type and modifiers. */ public SootField(String name, Type type, int modifiers) { this.name = name; this.type = type; this.modifiers = modifiers; if( type instanceof RefLikeType ) Scene.v().getFieldNumberer().add(this); }
/** Constructs a Soot field with the given name, type and modifiers. */ public SootField(String name, Type type, int modifiers) { this.name = name; this.type = type; this.modifiers = modifiers; if( type instanceof RefLikeType ) Scene.v().getFieldNumberer().add(this); }
/** Constructs a JimpleLocal of the given name and type. */ public JimpleLocal(String name, Type t) { this.name = name; this.type = t; Scene.v().getLocalNumberer().add( this ); }
/** Constructs a Soot field with the given name, type and no modifiers. */ public SootField(String name, Type type) { this.name = name; this.type = type; this.modifiers = 0; if( type instanceof RefLikeType ) Scene.v().getFieldNumberer().add(this); }
/** Constructs a JimpleLocal of the given name and type. */ public JimpleLocal(String name, Type t) { this.name = name; this.type = t; Scene.v().getLocalNumberer().add( this ); }
/** Constructs a Soot field with the given name, type and no modifiers. */ public SootField(String name, Type type) { this.name = name; this.type = type; this.modifiers = 0; if( type instanceof RefLikeType ) Scene.v().getFieldNumberer().add(this); }
public Type() { Scene.v().getTypeNumberer().add( this ); } /** Returns a textual representation of this type. */
public Type() { Scene.v().getTypeNumberer().add( this ); } /** Returns a textual representation of this type. */
/** Constructs an empty SootClass with the given name and modifiers. */ public SootClass(String name, int modifiers) { if( name.charAt(0) == '[' ) throw new RuntimeException( "Attempt to make a class whose name starts with [" ); setName( name); this.modifiers = modifiers; refType = RefType.v(name); refType.setSootClass(this); if(Options.v().debug_resolver()) G.v().out.println("created "+name+" with modifiers "+modifiers); setResolvingLevel(BODIES); Scene.v().getClassNumberer().add(this); }
/** Constructs an empty SootClass with the given name and modifiers. */ public SootClass(String name, int modifiers) { if( name.charAt(0) == '[' ) throw new RuntimeException( "Attempt to make a class whose name starts with [" ); setName( name); this.modifiers = modifiers; refType = RefType.v(name); refType.setSootClass(this); if(Options.v().debug_resolver()) G.v().out.println("created "+name+" with modifiers "+modifiers); setResolvingLevel(BODIES); Scene.v().getClassNumberer().add(this); }