class ComposeStackUtil {

    @SuppressWarnings("unchecked")
    public static Deque<Object> getComposeStack(Request request) {
        Map<String, Object> requestScope = request.getContext("request");
        Deque<Object> composeStack = (Deque<Object>) requestScope
                .get(COMPOSE_STACK_ATTRIBUTE_NAME);
        if (composeStack == null) {
            composeStack = new LinkedList<Object>();
            requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
        }
        return composeStack;
    }

    private  ComposeStackUtil();

}