class PrimitiveTypeConsequenceRewrite {

    public String rewrite(String consequence) {

        BlockStmt blockStmt;
        try {
            blockStmt = StaticJavaParser.parseBlock(consequence);
        } catch (ParseProblemException e) {
            logger.warn(String.format("Cannot post process consequence: %s", consequence));
            return consequence;
        }
        for (Statement t : blockStmt.getStatements()) {
            t.findAll(CastExpr.class, ce -> ce.getExpression().isNameExpr()).forEach(this::convertStatement);
        }

        return blockStmt.toString();
    }

    public  PrimitiveTypeConsequenceRewrite(RuleContext context);

}