Example usage for org.apache.commons.lang.builder ToStringStyle appendStart

List of usage examples for org.apache.commons.lang.builder ToStringStyle appendStart

Introduction

In this page you can find the example usage for org.apache.commons.lang.builder ToStringStyle appendStart.

Prototype

public void appendStart(StringBuffer buffer, Object object) 

Source Link

Document

Append to the toString the start of data indicator.

Usage

From source file:com.opengamma.integration.cashflow.PositionPayment.java

@Override
public String toString() {
    StringBuffer sb = new StringBuffer();
    ToStringStyle style = ToStringStyle.SHORT_PREFIX_STYLE;
    style.appendStart(sb, this);
    style.append(sb, "position", getPosition(), null);
    style.append(sb, "type", getPaymentType(), null);
    style.append(sb, "direction", getDirection(), null);
    style.append(sb, "index", getIndex(), null);
    style.append(sb, "amount", getAmount(), null);
    style.appendEnd(sb, this);
    return sb.toString();
}

From source file:com.opengamma.engine.value.ComputedValue.java

@Override
public String toString() {
    final StringBuffer sb = new StringBuffer();
    final ToStringStyle style = ToStringStyle.SHORT_PREFIX_STYLE;
    style.appendStart(sb, this);
    appendFieldsToString(sb, style);/* w w  w . jav a  2s. co m*/
    style.appendEnd(sb, this);
    return sb.toString();
}

From source file:com.opengamma.engine.view.calcnode.MutableExecutionLog.java

@Override
public String toString() {
    StringBuffer sb = new StringBuffer();
    ToStringStyle style = ToStringStyle.SHORT_PREFIX_STYLE;
    style.appendStart(sb, this);
    style.append(sb, "error", hasError(), null);
    style.append(sb, "warn", hasWarn(), null);
    style.append(sb, "info", hasInfo(), null);
    if (hasException()) {
        style.append(sb, "exception", getExceptionClass(), null);
    }/*from w ww  .j  av a2s .  c  om*/
    style.appendEnd(sb, this);
    return sb.toString();
}

From source file:com.opengamma.engine.calcnode.MutableExecutionLog.java

@Override
public String toString() {
    StringBuffer sb = new StringBuffer();
    ToStringStyle style = ToStringStyle.SHORT_PREFIX_STYLE;
    style.appendStart(sb, this);
    if (hasException()) {
        style.append(sb, "exception", getExceptionClass(), null);
    }//from   w ww. jav a  2 s .  com
    if (!_logLevels.isEmpty()) {
        style.append(sb, "logLevels", _logLevels, null);
    }
    style.appendEnd(sb, this);
    return sb.toString();
}