Example usage for org.apache.commons.lang3.builder ToStringStyle MULTI_LINE_STYLE

List of usage examples for org.apache.commons.lang3.builder ToStringStyle MULTI_LINE_STYLE

Introduction

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

Prototype

ToStringStyle MULTI_LINE_STYLE

To view the source code for org.apache.commons.lang3.builder ToStringStyle MULTI_LINE_STYLE.

Click Source Link

Document

The multi line toString style.

Usage

From source file:com.azaptree.services.spring.application.config.SpringApplicationServiceConfig.java

@Override
public String toString() {
    final ToStringBuilder sb = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE);
    if (ArrayUtils.isNotEmpty(configurationClasses)) {
        final String[] names = new String[configurationClasses.length];
        for (int i = 0; i < names.length; i++) {
            names[i] = configurationClasses[i].getName();
        }//w ww. j  av a 2s. c  o m
        sb.append("configurationClasses", Arrays.toString(names));
    }
    if (ArrayUtils.isNotEmpty(springProfiles)) {
        sb.append("springProfiles", Arrays.toString(springProfiles));
    }

    if (!CollectionUtils.isEmpty(jvmSystemProperties)) {
        final StringWriter sw = new StringWriter(256);
        try {
            jvmSystemProperties.store(sw, "JVM System Propperties");
        } catch (final IOException e) {
            throw new RuntimeException(e);
        }
        sb.append("jvmSystemProperties", sw.toString());
    }

    return sb.toString();
}

From source file:com.vaporwarecorp.mirror.feature.alexa.AlexaCommandManagerImpl.java

private void checkQueue() {
    //if we're out of things, hang up the phone and move on
    if (mAvsQueue.size() == 0) {
        removeVoiceView();/*from  w ww  . j a v  a  2  s. c o  m*/
        mEventManager.post(new SpeechEvent(""));
        return;
    }

    AvsItem current = mAvsQueue.removeFirst();
    Timber.d("Got %s", ToStringBuilder.reflectionToString(current, ToStringStyle.MULTI_LINE_STYLE));
    if (current instanceof AvsPlayRemoteItem) {
        removeVoiceView();
        //play a URL
        if (!mAudioPlayer.isPlaying()) {
            mAudioPlayer.playItem((AvsPlayRemoteItem) current);
        }
    } else if (current instanceof AvsPlayContentItem) {
        removeVoiceView();
        //play a URL
        if (!mAudioPlayer.isPlaying()) {
            mAudioPlayer.playItem((AvsPlayContentItem) current);
        }
    } else if (current instanceof AvsSpeakItem) {
        //play a sound file
        if (!mAudioPlayer.isPlaying()) {
            mAudioPlayer.playItem((AvsSpeakItem) current);
        }
    } else if (current instanceof AvsStopItem) {
        removeVoiceView();
        //stop our play
        mAudioPlayer.stop();
        mAvsQueue.remove(current);
    } else if (current instanceof AvsReplaceAllItem) {
        removeVoiceView();
        mAudioPlayer.stop();
        mAvsQueue.remove(current);
    } else if (current instanceof AvsReplaceEnqueuedItem) {
        removeVoiceView();
        mAvsQueue.remove(current);
    } else if (current instanceof AvsExpectSpeechItem) {
        //listen for user input
        mAudioPlayer.stop();
        voiceSearch();
    } else {
        removeVoiceView();
        mAudioPlayer.stop();
    }
}

From source file:com.azaptree.services.executor.ThreadPoolExecutor.java

@Override
public String toString() {
    final ToStringBuilder sb = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE);
    sb.append("activeCount", getActiveCount());
    sb.append("corePoolSize", getCorePoolSize());
    sb.append("largestPoolSize", getLargestPoolSize());
    sb.append("maximumPoolSize", getMaximumPoolSize());
    sb.append("poolSize", getPoolSize());
    sb.append("completedTaskCount", getCompletedTaskCount());
    sb.append("keepAliveTimeSecs", getKeepAliveTime(TimeUnit.SECONDS));
    sb.append("name", getName());
    sb.append("taskCount", getTaskCount());
    sb.append("allowsCoreThreadTimeOut", allowsCoreThreadTimeOut());
    return sb.toString();
}

From source file:com.github.dozermapper.core.classmap.ClassMap.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("source class", getSrcClassName())
            .append("destination class", getDestClassName()).append("map-id", mapId).toString();
}

From source file:com.omertron.slackbot.listeners.GoogleSheetsListener.java

/**
 * Retrieve and display the next game information from the sheet
 *
 * @param session/*from ww  w.ja  va 2 s . com*/
 * @param msgChannel
 */
private synchronized static void readSheetInfo() {
    sheetInfo = new SheetInfo();
    ValueRange response = GoogleSheets.getSheetData(SS_ID, RANGE_NEXT_GAME_DATA);

    List<List<Object>> values = response.getValues();
    if (values != null && !values.isEmpty()) {
        for (List row : values) {
            if (!row.isEmpty()) {
                decodeRowFromSheet(row);
            }
        }
    }

    GameLogRow row = readGameLogRow(sheetInfo.getLastRow());
    if (row.getAttendees() != null) {
        String players = row.getAttendees();
        for (String p : StringUtils.split(players, ",")) {
            sheetInfo.addPlayer(findPlayer(p));
        }
    }

    // Deal with the issue that the game ID may have been read as "#NAME?" due to the sheet recalculating
    if (sheetInfo.getNextGameId() <= 0) {
        LOG.info("Updated game ID from {} to {}", sheetInfo.getNextGameId(), row.getGameId());
        sheetInfo.setNextGameId(row.getGameId());
    }

    LOG.info("SheetInfo READ:\n{}",
            ToStringBuilder.reflectionToString(sheetInfo, ToStringStyle.MULTI_LINE_STYLE));
}

From source file:de.bausdorf.avm.tr064.beans.DeviceDesc.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("deviceType", this.deviceType)
            .append("friendlyName", this.friendlyName).append("manufacturer", this.manufacturer)
            .append("modelName", this.modelName).append("modelNumber", this.modelNumber)
            .append("modelDescription", this.modelDescription).append("udn", this.udn).append("upc", this.upc)
            .append(this.serviceList).append(this.deviceList).toString();
}

From source file:de.terrestris.shogun.model.User.java

/**
 *
 *///  w  w w. j av a 2 s. c  o m
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).appendSuper(super.toString())
            .append("user_name", user_name).append("user_firstname", user_firstname)
            .append("user_lastname", user_lastname).append("user_longname", user_longname)
            .append("user_email", user_email).append("user_country", user_country).append("active", active)
            .append("mapConfig", mapConfig).toString();
}

From source file:de.terrestris.shogun.model.MapLayer.java

/**
 *
 *//*  w ww .  j  a  v  a2  s  .  com*/
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).appendSuper(super.toString())
            .append("name", name).append("mapId", type).append("isBaseLayer", isBaseLayer)
            .append("alwaysInRange", alwaysInRange).append("visibility", visibility)
            .append("displayInLayerSwitcher", displayInLayerSwitcher).append("attribution", attribution)
            .append("gutter", gutter).append("isBaseLayer", isBaseLayer).append("projection", projection)
            .append("units", units).append("scales", scales).append("resolutions", resolutions)
            .append("maxExtent", maxExtent).append("minExtent", minExtent)
            .append("maxResolution", maxResolution).append("minResolution", minResolution)
            .append("maxScale", maxScale).append("minScale", minScale).append("numZoomLevels", numZoomLevels)
            .append("displayOutsideMaxExtent", displayOutsideMaxExtent)
            .append("transitionEffect", transitionEffect).append("metadata", metadata).append("groups", groups)
            .append("owner", owner).toString();
}

From source file:de.terrestris.shogun.model.Group.java

/**
 *
 *///www .  j a  v a  2s . c  o m
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).appendSuper(super.toString())
            .append("name", name).append("group_nr", group_nr).toString();
}

From source file:com.github.dozermapper.core.fieldmap.FieldMap.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("source field", srcField)
            .append("destination field", destField).append("type", type)
            .append("customConverter", customConverter).append("relationshipType", relationshipType)
            .append("removeOrphans", removeOrphans).append("mapId", mapId)
            .append("copyByReference", copyByReference)
            .append("copyByReferenceOveridden", copyByReferenceOveridden)
            .append("srcTypeHint", srcHintContainer).append("destTypeHint", destHintContainer).toString();
}