本文整理汇总了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);
}