Example usage for org.springframework.core.style StylerUtils style

List of usage examples for org.springframework.core.style StylerUtils style

Introduction

In this page you can find the example usage for org.springframework.core.style StylerUtils style.

Prototype

public static String style(Object value) 

Source Link

Document

Style the specified value according to default conventions.

Usage

From source file:org.springframework.webflow.execution.factory.ConditionalFlowExecutionListenerLoader.java

/**
 * Returns the array of flow execution listeners for specified flow.
 * @param flowDefinition the flow definition associated with the execution to be listened to
 * @return the flow execution listeners that apply
 *//*from w  w w  .j  a v  a 2 s.co  m*/
public FlowExecutionListener[] getListeners(FlowDefinition flowDefinition) {
    Assert.notNull(flowDefinition, "The Flow to load listeners for cannot be null");
    List<FlowExecutionListener> listenersToAttach = new LinkedList<FlowExecutionListener>();
    for (ConditionalFlowExecutionListenerHolder listenerHolder : listeners) {
        if (listenerHolder.listenerAppliesTo(flowDefinition)) {
            listenersToAttach.add(listenerHolder.getListener());
        }
    }
    if (logger.isDebugEnabled()) {
        logger.debug("Loaded [" + listenersToAttach.size() + "] of possible " + listeners.size()
                + " listeners for this execution request for flow '" + flowDefinition.getId()
                + "', the listeners to attach are " + StylerUtils.style(listenersToAttach));
    }
    return listenersToAttach.toArray(new FlowExecutionListener[listenersToAttach.size()]);
}