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

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

Introduction

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

Prototype

public void append(StringBuffer buffer, String fieldName, boolean[] array, Boolean fullDetail) 

Source Link

Document

Append to the toString a boolean array.

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.ComputedValueResult.java

@Override
protected void appendFieldsToString(StringBuffer sb, ToStringStyle style) {
    super.appendFieldsToString(sb, style);
    style.append(sb, "log", getAggregatedExecutionLog(), null);
}

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  w w  . ja va2s .c o  m
    style.appendEnd(sb, this);
    return sb.toString();
}

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

protected void appendFieldsToString(final StringBuffer sb, final ToStringStyle style) {
    // carefully select useful fields for toString
    final ValueSpecification spec = getSpecification();
    if (spec != null) {
        style.append(sb, "name", spec.getValueName(), null);
        final ComputationTargetSpecification targetSpec = spec.getTargetSpecification();
        style.append(sb, "targetId", targetSpec.getUniqueId(), null);
        style.append(sb, "targetType", targetSpec.getType(), null);
        style.append(sb, "properties", spec.getProperties(), null);
    }/*from  w  ww . j  a  v a2 s  .  c om*/
    style.append(sb, "value", getValue(), null);
}

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  w  w. ja  v a2s .co  m
    if (!_logLevels.isEmpty()) {
        style.append(sb, "logLevels", _logLevels, null);
    }
    style.appendEnd(sb, this);
    return sb.toString();
}