當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。