當前位置: 首頁>>代碼示例>>Java>>正文


Java ToStringStyle.SHORT_PREFIX_STYLE屬性代碼示例

本文整理匯總了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();
}
 
開發者ID:VHAINNOVATIONS,項目名稱:Telepathology,代碼行數:16,代碼來源:BeanUtils.java

示例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();
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:21,代碼來源:VariableConfig.java

示例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();
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:21,代碼來源:DatapointConfig.java

示例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();
}
 
開發者ID:luotuo,項目名稱:cas4.0.x-server-wechat,代碼行數:11,代碼來源:AbstractRegisteredService.java

示例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();
}
 
開發者ID:DevStreet,項目名稱:FinanceAnalytics,代碼行數:13,代碼來源:PositionPayment.java

示例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();
}
 
開發者ID:DevStreet,項目名稱:FinanceAnalytics,代碼行數:9,代碼來源:ComputedValue.java

示例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();
}
 
開發者ID:DevStreet,項目名稱:FinanceAnalytics,代碼行數:14,代碼來源:MutableExecutionLog.java

示例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();
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:7,代碼來源:HmRemoteControlOptions.java

示例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();
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:12,代碼來源:ProgramConfig.java

示例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();
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:9,代碼來源:AstroBindingConfig.java

示例11: toString

/**
 * {@inheritDoc}
 */
@Override
public String toString() {
	ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
	tsb.append("commandType", commandType.toString());
	return tsb.toString();
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:9,代碼來源:SagerCasterBindingConfig.java

示例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();
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:14,代碼來源:Weather.java

示例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();
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:15,代碼來源:WeatherBindingConfig.java

示例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();
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:16,代碼來源:ForecastBindingConfig.java

示例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();
}
 
開發者ID:abrenk,項目名稱:openhab-ulux-binding,代碼行數:12,代碼來源:UluxBindingConfig.java


注:本文中的org.apache.commons.lang.builder.ToStringStyle.SHORT_PREFIX_STYLE屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。