本文整理匯總了Java中org.apache.commons.lang.ObjectUtils.identityToString方法的典型用法代碼示例。如果您正苦於以下問題:Java ObjectUtils.identityToString方法的具體用法?Java ObjectUtils.identityToString怎麽用?Java ObjectUtils.identityToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.commons.lang.ObjectUtils
的用法示例。
在下文中一共展示了ObjectUtils.identityToString方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: generateKey
import org.apache.commons.lang.ObjectUtils; //導入方法依賴的package包/類
/**
* Generate a unique key.
*
* @param sldItem the sld item
* @return the string
*/
public static String generateKey(Object sldItem) {
if (sldItem == null) {
return NULL_VALUE;
}
return ObjectUtils.identityToString(sldItem);
}
示例2: toString
import org.apache.commons.lang.ObjectUtils; //導入方法依賴的package包/類
@Override
public String toString() {
return "Resource Loader: " + this.name + " (" + ObjectUtils.identityToString(this) + ") direct children resource loaders size: " + this.resourceLoaders.size();
}
示例3: appendAsObjectToString
import org.apache.commons.lang.ObjectUtils; //導入方法依賴的package包/類
/**
* <p>Appends with the same format as the default <code>Object toString()
* </code> method. Appends the class name followed by
* {@link System#identityHashCode(java.lang.Object)}.</p>
*
* @param object the <code>Object</code> whose class name and id to output
* @return this
* @since 2.0
*/
public ToStringBuilder appendAsObjectToString(Object object) {
ObjectUtils.identityToString(this.getStringBuffer(), object);
return this;
}
示例4: appendCyclicObject
import org.apache.commons.lang.ObjectUtils; //導入方法依賴的package包/類
/**
* <p>Append to the <code>toString</code> an <code>Object</code>
* value that has been detected to participate in a cycle. This
* implementation will print the standard string value of the value.</p>
*
* @param buffer the <code>StringBuffer</code> to populate
* @param fieldName the field name, typically not used as already appended
* @param value the value to add to the <code>toString</code>,
* not <code>null</code>
*
* @since 2.2
*/
protected void appendCyclicObject(StringBuffer buffer, String fieldName, Object value) {
ObjectUtils.identityToString(buffer, value);
}