当前位置: 首页>>代码示例>>Java>>正文


Java ToStringCreator类代码示例

本文整理汇总了Java中org.springframework.core.style.ToStringCreator的典型用法代码示例。如果您正苦于以下问题:Java ToStringCreator类的具体用法?Java ToStringCreator怎么用?Java ToStringCreator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ToStringCreator类属于org.springframework.core.style包,在下文中一共展示了ToStringCreator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: printCookies

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:24,代码来源:PrintingResultHandler.java

示例2: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
/**
 * 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();
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:27,代码来源:WebMergedContextConfiguration.java

示例3: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
@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());
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:20,代码来源:ProvisionerTest.java

示例4: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
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());
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:17,代码来源:ModelImporterTest.java

示例5: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
/**
 * <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();
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:24,代码来源:OnmsSnmpInterface.java

示例6: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
/**
 * <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();
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:22,代码来源:OnmsNode.java

示例7: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
/**
 * <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();
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:21,代码来源:OnmsVulnPlugin.java

示例8: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
/**
     * <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();
    }
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:22,代码来源:OnmsMonitoredService.java

示例9: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
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();
}
 
开发者ID:Jasig,项目名称:openregistry,代码行数:17,代码来源:JpaReconciliationCriteriaImpl.java

示例10: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
/**
 * <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();
}
 
开发者ID:vishwaabhinav,项目名称:OpenNMS,代码行数:22,代码来源:OnmsNode.java

示例11: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
@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();
}
 
开发者ID:awslabs,项目名称:amazon-ecs-java-microservices,代码行数:14,代码来源:Owner.java

示例12: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
@Override
public String toString() {
	return new ToStringCreator(this)
			.append("name", this.name)
			.append("definition", this.dslText)
			.toString();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dashboard,代码行数:8,代码来源:ApplicationDefinition.java

示例13: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
@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();
}
 
开发者ID:spring-io,项目名称:artifactory-resource,代码行数:11,代码来源:OutRequest.java

示例14: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
@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();
}
 
开发者ID:bmariesan,项目名称:iStudent,代码行数:10,代码来源:Person.java

示例15: toString

import org.springframework.core.style.ToStringCreator; //导入依赖的package包/类
@Override
public String toString() {
    ToStringCreator builder = new ToStringCreator(this);
    builder.append(this.strVal);
    builder.append(this.intVal);
    return builder.toString();
}
 
开发者ID:bmoliveira,项目名称:snake-yaml,代码行数:8,代码来源:Bean2.java


注:本文中的org.springframework.core.style.ToStringCreator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。