Java 类org.apache.commons.lang3.builder.RecursiveToStringStyle 实例源码

项目:odotCore    文件:ItemDaoTest.java   
@Test
@DisplayName("Find All Items")
public void testFindAll() {
  List<Item> items = classUnderTest.findAll();
  assertNotNull(items);
  assertAll(
      () -> assertFalse(items.isEmpty()),
      () -> assertEquals(7, items.size()));
  if (log.isDebugEnabled()) {
    log.debug("Items found: ");
    for (Item item : items) {
      log.debug(ReflectionToStringBuilder.toString(item, new RecursiveToStringStyle()));
    }
  }
}
项目:metasfresh    文件:ObjectUtils.java   
/**
 * To be used in {@link Object#toString()} implementations.
 *
 * Might arbitrarily throw exceptions. Therefore, Please consider to reimplement this, or to use e.g. {@link com.google.common.base.MoreObjects#toStringHelper(Object)}.
 *
 * @param obj the object to be printed
 * @param multiLine if <code>true</code> then use {@link RecursiveIndentedMultilineToStringStyle} to display it in multiple lines.
 * @return
 *
 */
public static final String toString(final Object obj, final boolean multiLine)
{
    if (obj == null)
    {
        return "<NULL>";
    }
    try
    {
        final ToStringStyle toStringStyle;
        if (multiLine)
        {
            toStringStyle = RecursiveIndentedMultilineToStringStyle.instance;
        }
        else
        {
            toStringStyle = RecursiveToStringStyle.SHORT_PREFIX_STYLE;
        }
        return new ExtendedReflectionToStringBuilder(obj, toStringStyle).toString();
    }
    catch (final Exception e)
    {
        // task 09493: catching possible errors

        // this doesn't work! still invokes the "high-level" toString() method
        // return ((Object)obj).toString() + " (WARNING: ExtendedReflectionToStringBuilder threw " + e + ")";
        return createFallBackMessage(obj, e);
    }
}
项目:home-server    文件:SlimmeMeterController.java   
@PostMapping
@ResponseStatus(HttpStatus.CREATED)
public void save(@RequestBody Dsmr42Reading dsmr42Reading) {
    if (LOGGER.isInfoEnabled()) {
        LOGGER.info(ReflectionToStringBuilder.toString(dsmr42Reading, new RecursiveToStringStyle()));
    }

    saveMeterstand(dsmr42Reading);
    saveOpgenomenVermogen(dsmr42Reading);
}
项目:Omoikane    文件:CDSServiceTest.java   
private void debugPrint(Object o) {
    RecursiveToStringStyle recursiveToStringStyle = new RecursiveToStringStyle() {{
        this.setContentStart("[");
        this.setFieldSeparatorAtStart(true);
        this.setFieldSeparator(SystemUtils.LINE_SEPARATOR + "  ");
        this.setContentEnd(SystemUtils.LINE_SEPARATOR + "]");
    }};

    System.out.println(ToStringBuilder.reflectionToString(o, recursiveToStringStyle));
}
项目:haystack-client-java    文件:RemoteDispatcher.java   
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .setExcludeFieldNames("acceptQueue", "executor", "flushTask", "senderTask")
        .toString();
}
项目:haystack-client-java    文件:LoggerDispatcher.java   
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .toString();
}
项目:haystack-client-java    文件:ChainedDispatcher.java   
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .toString();
}
项目:haystack-client-java    文件:PropagationRegistry.java   
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .toString();
}
项目:haystack-client-java    文件:TextMapPropagator.java   
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .toString();
}
项目:haystack-client-java    文件:Reference.java   
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .toString();
}
项目:haystack-client-java    文件:LogData.java   
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .toString();
}
项目:haystack-client-java    文件:Tracer.java   
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .setExcludeFieldNames("clock", "activeSource")
        .toString();
}
项目:haystack-client-java    文件:SpanContext.java   
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .toString();
}
项目:haystack-client-java    文件:Span.java   
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .setExcludeFieldNames("tracer", "clock")
        .toString();
}
项目:hub-bamboo    文件:HubServerConfigSerializable.java   
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, RecursiveToStringStyle.JSON_STYLE);
}
项目:hub-jira    文件:JiraVersion.java   
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, RecursiveToStringStyle.JSON_STYLE);
}
项目:SyncthingAndroid    文件:SessionRecyclerAdapter.java   
String dump() {
    return ReflectionToStringBuilder.reflectionToString(this, RecursiveToStringStyle.MULTI_LINE_STYLE);
}
项目:oregami-server    文件:BaseEntityUUID.java   
@Override
public String toString() {
       return ToStringBuilder.reflectionToString(this, RecursiveToStringStyle.JSON_STYLE);
   }