当前位置: 首页>>代码示例>>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;未经允许,请勿转载。