public Object clone() { return new JCastExpr(Jimple.cloneIfNecessary(getOp()), type); }
private void handleRefTypeAssignment(DefinitionStmt assignStmt, AnalysisInfo rhsInfo, AnalysisInfo out) { Value left = assignStmt.getLeftOp(); Value right = assignStmt.getRightOp(); // unbox casted value if (right instanceof JCastExpr) { JCastExpr castExpr = (JCastExpr) right; right = castExpr.getOp(); } // An assignment invalidates any assumptions of null/non-null for lhs // We COULD be more accurate by assigning those assumptions to the rhs prior to this statement rhsInfo.put(right, BOTTOM); // assign from rhs to lhs out.put(left, rhsInfo.get(right)); }
private void handleRefTypeAssignment(DefinitionStmt assignStmt, AnalysisInfo out) { Value left = assignStmt.getLeftOp(); Value right = assignStmt.getRightOp(); // unbox casted value if (right instanceof JCastExpr) { JCastExpr castExpr = (JCastExpr) right; right = castExpr.getOp(); } // if we have a definition (assignment) statement to a ref-like type, handle it, if (isAlwaysNonNull(right) || right instanceof NewExpr || right instanceof NewArrayExpr || right instanceof NewMultiArrayExpr || right instanceof ThisRef || right instanceof StringConstant || right instanceof ClassConstant || right instanceof CaughtExceptionRef) { // if we assign new... or @this, the result is non-null out.put(left, NON_NULL); } else if (right == NullConstant.v()) { // if we assign null, well, it's null out.put(left, NULL); } else if (left instanceof Local && right instanceof Local) { out.put(left, out.get(right)); } else if (left instanceof Local && right instanceof PhiExpr) { handlePhiExpr(out, left, (PhiExpr) right); } else { out.put(left, TOP); } }
public Object clone() { return new JCastExpr(Jimple.cloneIfNecessary(getOp()), type); }
public Object clone() { return new JCastExpr(Jimple.cloneIfNecessary(getOp()), type); }