class BooleanOptimizationRebuildingVisitor extends RebuildingVisitor {

    public static ASTJexlScript optimize(JexlNode node) {
        if (node == null) {
            return null;
        }
        
        BooleanOptimizationRebuildingVisitor visitor = new BooleanOptimizationRebuildingVisitor();
        
        return (ASTJexlScript) node.jjtAccept(visitor, null);
    }

}