Java 类org.springframework.core.style.ToStringCreator 实例源码

项目:spring4-understanding    文件:PrintingResultHandler.java   
/**
 * Print the supplied cookies in a human-readable form, assuming the
 * {@link Cookie} implementation does not provide its own {@code toString()}.
 * @since 4.2
 */
private void printCookies(Cookie[] cookies) {
    String[] cookieStrings = new String[cookies.length];
    for (int i = 0; i < cookies.length; i++) {
        Cookie cookie = cookies[i];
        cookieStrings[i] = new ToStringCreator(cookie)
            .append("name", cookie.getName())
            .append("value", cookie.getValue())
            .append("comment", cookie.getComment())
            .append("domain", cookie.getDomain())
            .append("maxAge", cookie.getMaxAge())
            .append("path", cookie.getPath())
            .append("secure", cookie.getSecure())
            .append("version", cookie.getVersion())
            .append("httpOnly", cookie.isHttpOnly())
            .toString();
    }
    this.printer.printValue("Cookies", cookieStrings);
}
项目:spring4-understanding    文件:WebMergedContextConfiguration.java   
/**
 * Provide a String representation of the {@linkplain #getTestClass() test class},
 * {@linkplain #getLocations() locations}, {@linkplain #getClasses() annotated classes},
 * {@linkplain #getContextInitializerClasses() context initializer classes},
 * {@linkplain #getActiveProfiles() active profiles},
 * {@linkplain #getPropertySourceLocations() property source locations},
 * {@linkplain #getPropertySourceProperties() property source properties},
 * {@linkplain #getResourceBasePath() resource base path}, the name of the
 * {@link #getContextLoader() ContextLoader}, and the
 * {@linkplain #getParent() parent configuration}.
 */
@Override
public String toString() {
    return new ToStringCreator(this)
            .append("testClass", getTestClass())
            .append("locations", ObjectUtils.nullSafeToString(getLocations()))
            .append("classes", ObjectUtils.nullSafeToString(getClasses()))
            .append("contextInitializerClasses", ObjectUtils.nullSafeToString(getContextInitializerClasses()))
            .append("activeProfiles", ObjectUtils.nullSafeToString(getActiveProfiles()))
            .append("propertySourceLocations", ObjectUtils.nullSafeToString(getPropertySourceLocations()))
            .append("propertySourceProperties", ObjectUtils.nullSafeToString(getPropertySourceProperties()))
            .append("resourceBasePath", getResourceBasePath())
            .append("contextLoader", nullSafeToString(getContextLoader()))
            .append("parent", getParent())
            .toString();
}
项目:opennmszh    文件:ProvisionerTest.java   
@Override
public String toString() {
    return (new ToStringCreator(this)
        .append("modelImportCount", getModelImportCount())
        .append("modelImportCompletedCount", getModelImportCompletedCount())
        .append("nodeCount", getNodeCount())
        .append("nodeCompletedCount", getNodeCompletedCount())
        .append("nodeCategoryCount", getNodeCategoryCount())
        .append("nodeCategoryCompletedCount", getNodeCategoryCompletedCount())
        .append("interfaceCount", getInterfaceCount())
        .append("interfaceCompletedCount", getInterfaceCompletedCount())
        .append("monitoredServiceCount", getMonitoredServiceCount())
        .append("monitoredServiceCompletedCount", getMonitoredServiceCompletedCount())
        .append("serviceCategoryCount", getServiceCategoryCount())
        .append("serviceCategoryCompletedCount", getServiceCategoryCompletedCount())
        .append("assetCount", getAssetCount())
        .append("assetCompletedCount", getAssetCompletedCount())
        .toString());
}
项目:opennmszh    文件:ModelImporterTest.java   
public String toString() {
    return (new ToStringCreator(this)
        .append("modelImportCount", getModelImportCount())
        .append("modelImportCompletedCount", getModelImportCompletedCount())
        .append("nodeCount", getNodeCount())
        .append("nodeCompletedCount", getNodeCompletedCount())
        .append("interfaceCount", getInterfaceCount())
        .append("interfaceCompletedCount", getInterfaceCompletedCount())
        .append("monitoredServiceCount", getMonitoredServiceCount())
        .append("monitoredServiceCompletedCount", getMonitoredServiceCompletedCount())
        .append("categoryCount", getCategoryCount())
        .append("categoryCompletedCount", getCategoryCompletedCount())
        .append("assetCount", getAssetCount())
        .append("assetCompletedCount", getAssetCompletedCount())
        .toString());
}
项目:opennmszh    文件:OnmsSnmpInterface.java   
/**
 * <p>toString</p>
 *
 * @return a {@link java.lang.String} object.
 */
public String toString() {
    return new ToStringCreator(this)
        .append("snmpipadentnetmask", getNetMask())
        .append("snmpphysaddr", getPhysAddr())
        .append("snmpifindex", getIfIndex())
        .append("snmpifdescr", getIfDescr())
        .append("snmpiftype", getIfType())
        .append("snmpifname", getIfName())
        .append("snmpifspeed", getIfSpeed())
        .append("snmpifadminstatus", getIfAdminStatus())
        .append("snmpifoperstatus", getIfOperStatus())
        .append("snmpifalias", getIfAlias())
        .append("snmpCollect", getCollect())
        .append("snmpPoll", getPoll())
        .append("lastCapsdPoll", getLastCapsdPoll())
        .append("lastSnmpPoll", getLastSnmpPoll())
        .toString();
}
项目:opennmszh    文件:OnmsNode.java   
/**
 * <p>toString</p>
 *
 * @return a {@link java.lang.String} object.
 */
public String toString() {
    ToStringCreator retval = new ToStringCreator(this);
    retval.append("id", m_id);
    retval.append("label", m_label);
    retval.append("parent.id", getParent() == null ? null : getParent().getId());
    retval.append("createTime", m_createTime);
    // retval.append("distPoller", m_distPoller);
    retval.append("sysObjectId", m_sysObjectId);
    retval.append("sysName", m_sysName);
    retval.append("sysDescription", m_sysDescription);
    retval.append("sysLocation", m_sysLocation);
    retval.append("sysContact", m_sysContact);
    retval.append("type", m_type);
    retval.append("operatingSystem", m_operatingSystem);
    return retval.toString();
}
项目:opennmszh    文件:OnmsVulnPlugin.java   
/**
 * <p>toString</p>
 *
 * @return a {@link java.lang.String} object.
 */
public String toString() {
    return new ToStringCreator(this)
        .append("pluginId", getPluginId())
        .append("pluginSubId", getPluginSubId())
        .append("name", getName())
        .append("category", getCategory())
        .append("copyright", getCopyright())
        .append("descr", getDescr())
        .append("summary", getSummary())
        .append("family", getFamily())
        .append("version", getVersion())
        .append("cveEntry", getCveEntry())
        .append("md5", getMd5())
        .toString();
}
项目:opennmszh    文件:OnmsMonitoredService.java   
/**
     * <p>toString</p>
     *
     * @return a {@link java.lang.String} object.
     */
    public String toString() {
        return new ToStringCreator(this)
        .append("id", m_id)
        .append("lastGood", m_lastGood)
        .append("lastFail", m_lastFail)
        .append("qualifier", m_qualifier)
        .append("status", m_status)
        .append("source", m_source)
        .append("notify", m_notify)
        .append("serviceType", m_serviceType)
        // cannot include these since the require db queries
//        .append("ipInterface", m_ipInterface)
//        .append("currentOutages", m_currentOutages)
//        .append("applications", m_applications)
        .toString();
    }
项目:openregistry    文件:JpaReconciliationCriteriaImpl.java   
public String toString() {
    final ToStringCreator toStringCreator = new ToStringCreator(this);
    toStringCreator.append("person", this.sorPerson);
    toStringCreator.append("emailAddress", this.emailAddress);
    toStringCreator.append("phoneCountryCode", this.phoneCountryCode);
    toStringCreator.append("phoneAreaCode", this.phoneAreaCode);
    toStringCreator.append("phoneNumber", this.phoneNumber);
    toStringCreator.append("phoneExtension", this.phoneExtension);
    toStringCreator.append("addressLine1", this.addressLine1);
    toStringCreator.append("addressLine2", this.addressLine2);
    toStringCreator.append("city", this.city);
    toStringCreator.append("region", this.region);
    toStringCreator.append("postalCode", this.postalCode);

    return toStringCreator.toString();
}
项目:OpenNMS    文件:ProvisionerTest.java   
@Override
public String toString() {
    return (new ToStringCreator(this)
        .append("modelImportCount", getModelImportCount())
        .append("modelImportCompletedCount", getModelImportCompletedCount())
        .append("nodeCount", getNodeCount())
        .append("nodeCompletedCount", getNodeCompletedCount())
        .append("nodeCategoryCount", getNodeCategoryCount())
        .append("nodeCategoryCompletedCount", getNodeCategoryCompletedCount())
        .append("interfaceCount", getInterfaceCount())
        .append("interfaceCompletedCount", getInterfaceCompletedCount())
        .append("monitoredServiceCount", getMonitoredServiceCount())
        .append("monitoredServiceCompletedCount", getMonitoredServiceCompletedCount())
        .append("serviceCategoryCount", getServiceCategoryCount())
        .append("serviceCategoryCompletedCount", getServiceCategoryCompletedCount())
        .append("assetCount", getAssetCount())
        .append("assetCompletedCount", getAssetCompletedCount())
        .toString());
}
项目:OpenNMS    文件:ModelImporterTest.java   
public String toString() {
    return (new ToStringCreator(this)
        .append("modelImportCount", getModelImportCount())
        .append("modelImportCompletedCount", getModelImportCompletedCount())
        .append("nodeCount", getNodeCount())
        .append("nodeCompletedCount", getNodeCompletedCount())
        .append("interfaceCount", getInterfaceCount())
        .append("interfaceCompletedCount", getInterfaceCompletedCount())
        .append("monitoredServiceCount", getMonitoredServiceCount())
        .append("monitoredServiceCompletedCount", getMonitoredServiceCompletedCount())
        .append("categoryCount", getCategoryCount())
        .append("categoryCompletedCount", getCategoryCompletedCount())
        .append("assetCount", getAssetCount())
        .append("assetCompletedCount", getAssetCompletedCount())
        .toString());
}
项目:OpenNMS    文件:OnmsSnmpInterface.java   
/**
 * <p>toString</p>
 *
 * @return a {@link java.lang.String} object.
 */
public String toString() {
    return new ToStringCreator(this)
        .append("snmpipadentnetmask", getNetMask())
        .append("snmpphysaddr", getPhysAddr())
        .append("snmpifindex", getIfIndex())
        .append("snmpifdescr", getIfDescr())
        .append("snmpiftype", getIfType())
        .append("snmpifname", getIfName())
        .append("snmpifspeed", getIfSpeed())
        .append("snmpifadminstatus", getIfAdminStatus())
        .append("snmpifoperstatus", getIfOperStatus())
        .append("snmpifalias", getIfAlias())
        .append("snmpCollect", getCollect())
        .append("snmpPoll", getPoll())
        .append("lastCapsdPoll", getLastCapsdPoll())
        .append("lastSnmpPoll", getLastSnmpPoll())
        .toString();
}
项目:OpenNMS    文件:OnmsNode.java   
/**
 * <p>toString</p>
 *
 * @return a {@link java.lang.String} object.
 */
public String toString() {
    ToStringCreator retval = new ToStringCreator(this);
    retval.append("id", m_id);
    retval.append("label", m_label);
    retval.append("parent.id", getParent() == null ? "null" : getParent().getId());
    retval.append("createTime", m_createTime);
    // retval.append("distPoller", m_distPoller);
    retval.append("sysObjectId", m_sysObjectId);
    retval.append("sysName", m_sysName);
    retval.append("sysDescription", m_sysDescription);
    retval.append("sysLocation", m_sysLocation);
    retval.append("sysContact", m_sysContact);
    retval.append("type", m_type);
    retval.append("operatingSystem", m_operatingSystem);
    return retval.toString();
}
项目:OpenNMS    文件:OnmsVulnPlugin.java   
/**
 * <p>toString</p>
 *
 * @return a {@link java.lang.String} object.
 */
public String toString() {
    return new ToStringCreator(this)
        .append("pluginId", getPluginId())
        .append("pluginSubId", getPluginSubId())
        .append("name", getName())
        .append("category", getCategory())
        .append("copyright", getCopyright())
        .append("descr", getDescr())
        .append("summary", getSummary())
        .append("family", getFamily())
        .append("version", getVersion())
        .append("cveEntry", getCveEntry())
        .append("md5", getMd5())
        .toString();
}
项目:OpenNMS    文件:OnmsMonitoredService.java   
/**
     * <p>toString</p>
     *
     * @return a {@link java.lang.String} object.
     */
    public String toString() {
        return new ToStringCreator(this)
        .append("id", m_id)
        .append("lastGood", m_lastGood)
        .append("lastFail", m_lastFail)
        .append("qualifier", m_qualifier)
        .append("status", m_status)
        .append("source", m_source)
        .append("notify", m_notify)
        .append("serviceType", m_serviceType)
        // cannot include these since the require db queries
//        .append("ipInterface", m_ipInterface)
//        .append("currentOutages", m_currentOutages)
//        .append("applications", m_applications)
        .toString();
    }
项目:amazon-ecs-java-microservices    文件:Owner.java   
@Override
public String toString() {
    return new ToStringCreator(this)

        .append("id", this.getId())
        .append("new", this.isNew())
        .append("lastName", this.getLastName())
        .append("firstName", this.getFirstName())
        .append("address", this.address)
        .append("city", this.city)
        .append("telephone", this.telephone)
        .toString();
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
@Override
public String toString() {
    return new ToStringCreator(this)

        .append("id", this.getId())
        .append("new", this.isNew())
        .append("lastName", this.getLastName())
        .append("firstName", this.getFirstName())
        .append("address", this.address)
        .append("city", this.city)
        .append("telephone", this.telephone)
        .toString();
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
@Override
public String toString() {
    return new ToStringCreator(this)

        .append("id", this.getId())
        .append("new", this.isNew())
        .append("lastName", this.getLastName())
        .append("firstName", this.getFirstName())
        .append("address", this.address)
        .append("city", this.city)
        .append("telephone", this.telephone)
        .toString();
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
@Override
public String toString() {
    return new ToStringCreator(this)

        .append("id", this.getId())
        .append("new", this.isNew())
        .append("lastName", this.getLastName())
        .append("firstName", this.getFirstName())
        .append("address", this.address)
        .append("city", this.city)
        .append("telephone", this.telephone)
        .toString();
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
@Override
public String toString() {
    return new ToStringCreator(this)

        .append("id", this.getId())
        .append("new", this.isNew())
        .append("lastName", this.getLastName())
        .append("firstName", this.getFirstName())
        .append("address", this.address)
        .append("city", this.city)
        .append("telephone", this.telephone)
        .toString();
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
@Override
public String toString() {
    return new ToStringCreator(this)

        .append("id", this.getId())
        .append("new", this.isNew())
        .append("lastName", this.getLastName())
        .append("firstName", this.getFirstName())
        .append("address", this.address)
        .append("city", this.city)
        .append("telephone", this.telephone)
        .toString();
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
@Override
public String toString() {
    return new ToStringCreator(this)

        .append("id", this.getId())
        .append("new", this.isNew())
        .append("lastName", this.getLastName())
        .append("firstName", this.getFirstName())
        .append("address", this.address)
        .append("city", this.city)
        .append("telephone", this.telephone)
        .toString();
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
@Override
public String toString() {
    return new ToStringCreator(this)

        .append("id", this.getId())
        .append("new", this.isNew())
        .append("lastName", this.getLastName())
        .append("firstName", this.getFirstName())
        .append("address", this.address)
        .append("city", this.city)
        .append("telephone", this.telephone)
        .toString();
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
@Override
public String toString() {
    return new ToStringCreator(this)

        .append("id", this.getId())
        .append("new", this.isNew())
        .append("lastName", this.getLastName())
        .append("firstName", this.getFirstName())
        .append("address", this.address)
        .append("city", this.city)
        .append("telephone", this.telephone)
        .toString();
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
@Override
public String toString() {
    return new ToStringCreator(this)

        .append("id", this.getId())
        .append("new", this.isNew())
        .append("lastName", this.getLastName())
        .append("firstName", this.getFirstName())
        .append("address", this.address)
        .append("city", this.city)
        .append("telephone", this.telephone)
        .toString();
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
@Override
public String toString() {
    return new ToStringCreator(this)

        .append("id", this.getId())
        .append("new", this.isNew())
        .append("lastName", this.getLastName())
        .append("firstName", this.getFirstName())
        .append("address", this.address)
        .append("city", this.city)
        .append("telephone", this.telephone)
        .toString();
}
项目:spring-cloud-dashboard    文件:ApplicationDefinition.java   
@Override
public String toString() {
    return new ToStringCreator(this)
            .append("name", this.name)
            .append("definition", this.dslText)
            .toString();
}
项目:artifactory-resource    文件:OutRequest.java   
@Override
public String toString() {
    return new ToStringCreator(this).append("buildNumber", this.buildNumber)
            .append("folder", this.folder).append("include", this.include)
            .append("exclude", this.exclude)
            .append("moduleLayout", this.moduleLayout)
            .append("buildUri", this.buildUri)
            .append("stripSnapshotTimestamps", this.stripSnapshotTimestamps)
            .append("artifactSet", this.artifactSet).toString();
}
项目:iStudent    文件:Person.java   
@Override
public String toString() {
    return new ToStringCreator(this)
            .append("type", this.getClass().getSimpleName())
            .append("id", this.id)
            .append("lastName", this.lastName)
            .append("firstName", this.firstName)
            .toString();
}
项目:snake-yaml    文件:Bean2.java   
@Override
public String toString() {
    ToStringCreator builder = new ToStringCreator(this);
    builder.append(this.strVal);
    builder.append(this.intVal);
    return builder.toString();
}
项目:snake-yaml    文件:Bean1.java   
@Override
public String toString() {
    ToStringCreator builder = new ToStringCreator(this);
    builder.append(this.strVal);
    builder.append(this.intVal);
    return builder.toString();
}
项目:spring4-understanding    文件:TransactionConfigurationAttributes.java   
@Override
public String toString() {
    return new ToStringCreator(this)
            .append("transactionManagerName", this.transactionManagerName)
            .append("defaultRollback", this.defaultRollback)
            .toString();
}
项目:spring4-understanding    文件:MergedSqlConfig.java   
/**
 * Provide a String representation of the merged SQL script configuration.
 */
@Override
public String toString() {
    return new ToStringCreator(this)//
    .append("dataSource", dataSource)//
    .append("transactionManager", transactionManager)//
    .append("transactionMode", transactionMode)//
    .append("encoding", encoding)//
    .append("separator", separator)//
    .append("commentPrefix", commentPrefix)//
    .append("blockCommentStartDelimiter", blockCommentStartDelimiter)//
    .append("blockCommentEndDelimiter", blockCommentEndDelimiter)//
    .append("errorMode", errorMode)//
    .toString();
}
项目:spring4-understanding    文件:TestPropertySourceAttributes.java   
/**
 * Provide a String representation of the {@code @TestPropertySource}
 * attributes and declaring class.
 */
@Override
public String toString() {
    return new ToStringCreator(this)//
    .append("declaringClass", declaringClass.getName())//
    .append("locations", ObjectUtils.nullSafeToString(locations))//
    .append("inheritLocations", inheritLocations)//
    .append("properties", ObjectUtils.nullSafeToString(properties))//
    .append("inheritProperties", inheritProperties)//
    .toString();
}
项目:spring4-understanding    文件:DefaultBootstrapContext.java   
/**
 * Provide a String representation of this bootstrap context's state.
 */
@Override
public String toString() {
    return new ToStringCreator(this)//
    .append("testClass", testClass.getName())//
    .append("cacheAwareContextLoaderDelegate", cacheAwareContextLoaderDelegate.getClass().getName())//
    .toString();
}
项目:spring4-understanding    文件:DefaultTestContext.java   
/**
 * Provide a String representation of this test context's state.
 */
@Override
public String toString() {
    return new ToStringCreator(this)
            .append("testClass", this.testClass)
            .append("testInstance", this.testInstance)
            .append("testMethod", this.testMethod)
            .append("testException", this.testException)
            .append("mergedContextConfiguration", this.mergedContextConfiguration)
            .toString();
}
项目:spring4-understanding    文件:DefaultContextCache.java   
/**
 * Generate a text string containing the implementation type of this
 * cache and its statistics.
 * <p>The string returned by this method contains all information
 * required for compliance with the contract for {@link #logStatistics()}.
 * @return a string representation of this cache, including statistics
 */
@Override
public String toString() {
    return new ToStringCreator(this)
            .append("size", size())
            .append("parentContextCount", getParentContextCount())
            .append("hitCount", getHitCount())
            .append("missCount", getMissCount())
            .toString();
}
项目:spring4-understanding    文件:MergedContextConfiguration.java   
/**
 * Provide a String representation of the {@linkplain #getTestClass() test class},
 * {@linkplain #getLocations() locations}, {@linkplain #getClasses() annotated classes},
 * {@linkplain #getContextInitializerClasses() context initializer classes},
 * {@linkplain #getActiveProfiles() active profiles},
 * {@linkplain #getPropertySourceLocations() property source locations},
 * {@linkplain #getPropertySourceProperties() property source properties},
 * the name of the {@link #getContextLoader() ContextLoader}, and the
 * {@linkplain #getParent() parent configuration}.
 */
@Override
public String toString() {
    return new ToStringCreator(this)
            .append("testClass", this.testClass)
            .append("locations", ObjectUtils.nullSafeToString(this.locations))
            .append("classes", ObjectUtils.nullSafeToString(this.classes))
            .append("contextInitializerClasses", ObjectUtils.nullSafeToString(this.contextInitializerClasses))
            .append("activeProfiles", ObjectUtils.nullSafeToString(this.activeProfiles))
            .append("propertySourceLocations", ObjectUtils.nullSafeToString(this.propertySourceLocations))
            .append("propertySourceProperties", ObjectUtils.nullSafeToString(this.propertySourceProperties))
            .append("contextLoader", nullSafeToString(this.contextLoader))
            .append("parent", this.parent)
            .toString();
}
项目:spring4-understanding    文件:ContextConfigurationAttributes.java   
/**
 * Provide a String representation of the context configuration attributes
 * and declaring class.
 */
@Override
public String toString() {
    return new ToStringCreator(this)
            .append("declaringClass", this.declaringClass.getName())
            .append("classes", ObjectUtils.nullSafeToString(this.classes))
            .append("locations", ObjectUtils.nullSafeToString(this.locations))
            .append("inheritLocations", this.inheritLocations)
            .append("initializers", ObjectUtils.nullSafeToString(this.initializers))
            .append("inheritInitializers", this.inheritInitializers)
            .append("name", this.name)
            .append("contextLoaderClass", this.contextLoaderClass.getName())
            .toString();
}
项目:spring4-understanding    文件:MetaAnnotationUtils.java   
/**
 * Provide a textual representation of this {@code AnnotationDescriptor}.
 */
@Override
public String toString() {
    return new ToStringCreator(this)
            .append("rootDeclaringClass", this.rootDeclaringClass)
            .append("declaringClass", this.declaringClass)
            .append("composedAnnotation", this.composedAnnotation)
            .append("annotation", this.annotation)
            .toString();
}