本文整理汇总了Java中org.apache.commons.lang.builder.ToStringStyle.SHORT_PREFIX_STYLE属性的典型用法代码示例。如果您正苦于以下问题:Java ToStringStyle.SHORT_PREFIX_STYLE属性的具体用法?Java ToStringStyle.SHORT_PREFIX_STYLE怎么用?Java ToStringStyle.SHORT_PREFIX_STYLE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.commons.lang.builder.ToStringStyle
的用法示例。
在下文中一共展示了ToStringStyle.SHORT_PREFIX_STYLE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toString
public static String toString(Object obj) {
ToStringBuilder builder = new ToStringBuilder(obj, ToStringStyle.SHORT_PREFIX_STYLE);
for (AccessibleObject ao : getAccessibleObjects(obj, 4)) {
try {
if (ao instanceof Field) {
builder.append(((Field) ao).getName(), ((Field) ao).get(obj));
} else {
builder.append(((java.lang.reflect.Method) ao).getName(),
((java.lang.reflect.Method) ao).invoke(obj, (Object[]) null));
}
} catch (Exception e) {}
}
return builder.toString();
}
示例2: toString
/**
* {@inheritDoc}
*/
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
tsb.append("name", name);
if (converter != null) {
tsb.append("converter", converter);
}
if (action != null) {
tsb.append("action", action);
}
if (forceUpdate) {
tsb.append("forceUpdate", forceUpdate);
}
if (delay > 0.0) {
tsb.append("delay", delay);
}
return tsb.toString();
}
示例3: toString
/**
* {@inheritDoc}
*/
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
tsb.append("address", address).append("channel", channel).append("parameter", parameter);
if (converter != null) {
tsb.append("converter", converter);
}
if (action != null) {
tsb.append("action", action);
}
if (forceUpdate) {
tsb.append("forceUpdate", forceUpdate);
}
if (delay > 0.0) {
tsb.append("delay", delay);
}
return tsb.toString();
}
示例4: toString
public String toString() {
final ToStringBuilder toStringBuilder = new ToStringBuilder(null, ToStringStyle.SHORT_PREFIX_STYLE);
toStringBuilder.append("id", this.id);
toStringBuilder.append("name", this.name);
toStringBuilder.append("description", this.description);
toStringBuilder.append("serviceId", this.serviceId);
toStringBuilder.append("usernameAttribute", this.usernameAttribute);
toStringBuilder.append("attributes", this.allowedAttributes.toArray());
return toStringBuilder.toString();
}
示例5: toString
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
ToStringStyle style = ToStringStyle.SHORT_PREFIX_STYLE;
style.appendStart(sb, this);
style.append(sb, "position", getPosition(), null);
style.append(sb, "type", getPaymentType(), null);
style.append(sb, "direction", getDirection(), null);
style.append(sb, "index", getIndex(), null);
style.append(sb, "amount", getAmount(), null);
style.appendEnd(sb, this);
return sb.toString();
}
示例6: toString
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
final ToStringStyle style = ToStringStyle.SHORT_PREFIX_STYLE;
style.appendStart(sb, this);
appendFieldsToString(sb, style);
style.appendEnd(sb, this);
return sb.toString();
}
示例7: toString
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
ToStringStyle style = ToStringStyle.SHORT_PREFIX_STYLE;
style.appendStart(sb, this);
if (hasException()) {
style.append(sb, "exception", getExceptionClass(), null);
}
if (!_logLevels.isEmpty()) {
style.append(sb, "logLevels", _logLevels, null);
}
style.appendEnd(sb, this);
return sb.toString();
}
示例8: toString
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
tsb.append("text", text).append("beep", beep).append("backlight", backlight).append("unit", unit)
.append("symbols", symbols);
return tsb.toString();
}
示例9: toString
/**
* {@inheritDoc}
*/
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
tsb.append("name", name);
if (action != null) {
tsb.append("action", action);
}
return tsb.toString();
}
示例10: toString
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
tsb.append("planet", planetName.toString().toLowerCase()).append("type", type).append("property", property);
if (offset != 0) {
tsb.append("offset", offset);
}
return tsb.toString();
}
示例11: toString
/**
* {@inheritDoc}
*/
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
tsb.append("commandType", commandType.toString());
return tsb.toString();
}
示例12: toString
/**
* {@inheritDoc}
*/
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
if (this instanceof org.openhab.binding.weather.internal.model.Forecast) {
tsb.append("day", ((org.openhab.binding.weather.internal.model.Forecast) this).getDay());
}
tsb.append(temperature).append(atmosphere).append(clouds).append(condition).append(precipitation).append(wind)
.append(station).append(error);
return tsb.toString();
}
示例13: toString
/**
* {@inheritDoc}
*/
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
tsb.append("locationId", locationId).append("type", type).append("property", property);
if (roundingMode != null) {
tsb.append("roundingMode", roundingMode).append("scale", scale);
}
if (unit != null) {
tsb.append("unit", unit.toString());
}
return tsb.toString();
}
示例14: toString
/**
* {@inheritDoc}
*/
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
tsb.append("locationId", getLocationId()).append("forecast", forecastDay).append("type", getType())
.append("property", getProperty());
if (getRoundingMode() != null) {
tsb.append("roundingMode", getRoundingMode()).append("scale", getScale());
}
if (getUnit() != null) {
tsb.append("unit", getUnit().toString());
}
return tsb.toString();
}
示例15: toString
@Override
public String toString() {
final ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
builder.append("switchId", this.switchId);
builder.append("actorId", this.actorId);
builder.append("type", this.type);
if (this.additionalConfiguration != null) {
builder.append("additionalConfiguration", this.additionalConfiguration);
}
return builder.toString();
}