class CommonCodegenUtils {

    public static Optional<VariableDeclarator> getVariableDeclarator(final BlockStmt body, final String variableName) {
        return body.findAll(VariableDeclarator.class)
                .stream()
                .filter(variableDeclarator -> variableDeclarator.getName().asString().equals(variableName))
                .findFirst();
    }

    private  CommonCodegenUtils();

}