Search in sources :

Example 91 with ToStringBuilder

use of org.apache.commons.lang.builder.ToStringBuilder in project accumulo by apache.

the class HostRegexTableLoadBalancer method toString.

@Override
public String toString() {
    ToStringBuilder buf = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    buf.append("\nTablet Out Of Bounds Check Interval", this.oobCheckMillis);
    buf.append("\nMax Tablet Server Migrations", this.maxTServerMigrations);
    buf.append("\nRegular Expressions use IPs", this.isIpBasedRegex);
    buf.append("\nPools", this.poolNameToRegexPattern);
    return buf.toString();
}
Also used : ToStringBuilder(org.apache.commons.lang.builder.ToStringBuilder)

Example 92 with ToStringBuilder

use of org.apache.commons.lang.builder.ToStringBuilder in project motech by motech.

the class ReflectionsUtil method getAnnotationValue.

/**
 * Retrieves a value of the specified property from the given annotation.
 *
 * @param annotation an annotation to look for the property in
 * @param property a property to retrieve value for
 * @param defaultValues default values to return, in case the property is not set
 * @return value of the property from the annotation, or default values
 */
public static String getAnnotationValue(Annotation annotation, String property, String... defaultValues) {
    Object value = getValue(annotation, property);
    String valueAsString = null;
    if (null != value) {
        valueAsString = new ToStringBuilder(value, ToStringStyle.SIMPLE_STYLE).append(value).toString();
    }
    for (String defaultValue : defaultValues) {
        valueAsString = defaultIfBlank(valueAsString, defaultValue);
    }
    return valueAsString;
}
Also used : ToStringBuilder(org.apache.commons.lang.builder.ToStringBuilder) AccessibleObject(java.lang.reflect.AccessibleObject)

Example 93 with ToStringBuilder

use of org.apache.commons.lang.builder.ToStringBuilder in project coprhd-controller by CoprHD.

the class FibreChannelHBA method toString.

@Override
public String toString() {
    ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    builder.append("nodeWWN", nodeWWN);
    builder.append("portWWN", portWWN);
    builder.append("instanceName", instanceName);
    return builder.toString();
}
Also used : ToStringBuilder(org.apache.commons.lang.builder.ToStringBuilder)

Example 94 with ToStringBuilder

use of org.apache.commons.lang.builder.ToStringBuilder in project coprhd-controller by CoprHD.

the class Disk method toString.

@Override
public String toString() {
    ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    builder.append("number", number);
    builder.append("diskId", diskId);
    builder.append("type", type);
    builder.append("status", status);
    builder.append("path", path);
    builder.append("target", target);
    builder.append("lunId", lunId);
    builder.append("locationPath", locationPath);
    builder.append("currentReadOnlyState", currentReadOnlyState);
    builder.append("readOnly", readOnly);
    builder.append("bootDisk", bootDisk);
    builder.append("pageFileDisk", pageFileDisk);
    builder.append("hibernationFileDisk", hibernationFileDisk);
    builder.append("crashdumpDisk", crashdumpDisk);
    builder.append("volumes", volumes);
    return builder.toString();
}
Also used : ToStringBuilder(org.apache.commons.lang.builder.ToStringBuilder)

Example 95 with ToStringBuilder

use of org.apache.commons.lang.builder.ToStringBuilder in project coprhd-controller by CoprHD.

the class IScsiSession method toString.

@Override
public String toString() {
    ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    builder.append("targetAddress", targetAddress);
    builder.append("targetPort", targetPort);
    builder.append("initiatorName", initiatorName);
    builder.append("sessionId", sessionId);
    builder.append("targetName", targetName);
    builder.append("devices", devices);
    return builder.toString();
}
Also used : ToStringBuilder(org.apache.commons.lang.builder.ToStringBuilder)

Aggregations

ToStringBuilder (org.apache.commons.lang.builder.ToStringBuilder)113 SimpleDateFormat (java.text.SimpleDateFormat)2 TimeZone (java.util.TimeZone)2 DataMap (com.linkedin.data.DataMap)1 ProtocolVersion (com.linkedin.restli.common.ProtocolVersion)1 PropertyChangeEvent (java.beans.PropertyChangeEvent)1 PropertyChangeListener (java.beans.PropertyChangeListener)1 AccessibleObject (java.lang.reflect.AccessibleObject)1 InetAddress (java.net.InetAddress)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 Date (java.util.Date)1 HashMap (java.util.HashMap)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Map (java.util.Map)1 Properties (java.util.Properties)1 Set (java.util.Set)1 Collectors (java.util.stream.Collectors)1