@Override public IClassHierarchy getClassHierarchy() { return builder.getClassHierarchy(); } }
@Override public IClassHierarchy getClassHierarchy() { return builder.getClassHierarchy(); } }
/** * @return the PointerKey that acts as a representation for the class of pointers that includes the given instance field. null if * there's some problem. * @throws IllegalArgumentException if I is null * @throws IllegalArgumentException if field is null */ public PointerKey getPointerKeyForInstanceField(InstanceKey I, IField field) { if (field == null) { throw new IllegalArgumentException("field is null"); } if (I == null) { throw new IllegalArgumentException("I is null"); } IClass t = field.getDeclaringClass(); IClass C = I.getConcreteType(); if (!(C instanceof SyntheticClass)) { if (!getClassHierarchy().isSubclassOf(C, t)) { return null; } } return pointerKeyFactory.getPointerKeyForInstanceField(I, field); }
/** * @return the PointerKey that acts as a representation for the class of pointers that includes the given instance field. null if * there's some problem. * @throws IllegalArgumentException if I is null * @throws IllegalArgumentException if field is null */ public PointerKey getPointerKeyForInstanceField(InstanceKey I, IField field) { if (field == null) { throw new IllegalArgumentException("field is null"); } if (I == null) { throw new IllegalArgumentException("I is null"); } IClass t = field.getDeclaringClass(); IClass C = I.getConcreteType(); if (!(C instanceof SyntheticClass)) { if (!getClassHierarchy().isSubclassOf(C, t)) { return null; } } return pointerKeyFactory.getPointerKeyForInstanceField(I, field); }
public IMethod getCalleeTarget(CGNode caller, CallSiteReference site, IClass receiver) { PointerAnalysis<InstanceKey> pointerAnalysis = builder.getPointerAnalysis(); JavaScriptLoader jsLoader = (JavaScriptLoader) builder.getClassHierarchy().getLoader(JavaScriptTypes.jsLoader); JSCallGraphUtil.loadAdditionalFile(builder.getClassHierarchy(), jsLoader, sourceModule); IClass script = builder.getClassHierarchy() .lookupClass(TypeReference.findOrCreate(jsLoader.getReference(), className));
changedNodes.addAll(modifyFactoryInterpreter(st, casts, builder.getContextInterpreter(), builder.getClassHierarchy()));
changedNodes.addAll(modifyFactoryInterpreter(st, casts, builder.getContextInterpreter(), builder.getClassHierarchy()));
@Test(expected = WalaException.class) public void testParseError() throws IllegalArgumentException, IOException, CancelException, WalaException { PropagationCallGraphBuilder B = JSCallGraphBuilderUtil.makeScriptCGBuilder("tests", "portal-example-simple.html"); B.makeCallGraph(B.getOptions()); com.ibm.wala.cast.util.Util.checkForFrontEndErrors(B.getClassHierarchy()); }
return; IClass contents = getClassHierarchy().lookupClass(C); if (contents == null) { assert false : "null type for " + C + ' ' + I.getConcreteType(); if (getClassHierarchy().implementsInterface(instance.getConcreteType(), contents)) { sideEffect.b |= system.newConstraint(p, instance); if (getClassHierarchy().isSubclassOf(instance.getConcreteType(), contents)) { sideEffect.b |= system.newConstraint(p, instance);
return; IClass contents = getClassHierarchy().lookupClass(C); if (contents == null) { assert false : "null type for " + C + ' ' + I.getConcreteType(); if (getClassHierarchy().implementsInterface(instance.getConcreteType(), contents)) { sideEffect.b |= system.newConstraint(p, instance); if (getClassHierarchy().isSubclassOf(instance.getConcreteType(), contents)) { sideEffect.b |= system.newConstraint(p, instance);
continue; IClass contents = getClassHierarchy().lookupClass(C); if (contents == null) { assert false : "null type for " + C + ' ' + I.getConcreteType();
continue; IClass contents = getClassHierarchy().lookupClass(C); if (contents == null) { assert false : "null type for " + C + ' ' + I.getConcreteType();