Java 类org.apache.commons.lang.builder.ToStringStyle 实例源码

项目:spring-i18n-support    文件:SimpleJdbcMessageSourceDao.java   
@Override
public List<String> findDistinctLang() {
    if (this.availableLanguages == null) {
        LOG.info("Initialize available Languages.");
        List<String> locales = new ArrayList<>();
        List<MessageResource> messages = this.findAll();
        for (MessageResource resource : messages) {
            String locale = resource.getLang();
            if (!locales.contains(locale)) {
                locales.add(locale);
            }
        }
        this.availableLanguages = locales;
        LOG.info("Available locales are: " + ToStringBuilder.reflectionToString(locales, ToStringStyle.SHORT_PREFIX_STYLE));
    }
    return this.availableLanguages;
}
项目:java-power-assert    文件:ExpressionRenderer.java   
private String renderValue(Object value) {
    String str;
    if(value == null)
        str = "null";
    else if(value.getClass().isArray()) {
        // recursive string join
        str = "[";
        for(Object o: toArray(value)) {
            str += renderValue(o) + ", ";
        }
        str = (str.length() > 1 ? str.substring(0, str.length()-2) : "") + "]";
    }
    else {
        try {
            if(value.getClass().getMethod("toString").getDeclaringClass() == Object.class) {
                str = ToStringBuilder.reflectionToString(value, ToStringStyle.SHORT_PREFIX_STYLE);
            }
            else str = value.toString();
        } catch (NoSuchMethodException e) {
            str = value.toString();
        }
    }

    return showTypes && value != null ? str + " (" + value.getClass().getName() + ")" : str;
}
项目:report    文件:ObjectUtil.java   
/**
 * 对象转字符串
 * @param obj
 *          目标对象
 * 
 * @param style
 *          @see org.apache.commons.lang.builder.ToStringStyle
 * 
 * @return
 */
public static String toString(Object obj, ToStringStyle style){
    if(null == obj){
        return "";
    }

    StringBuilder defaultObjReg = new StringBuilder();
    defaultObjReg.append("^[\\w\\.]*");
    defaultObjReg.append(obj.getClass().getSimpleName());
    defaultObjReg.append("@");
    defaultObjReg.append("[a-zA-Z0-9]+");
    defaultObjReg.append("$");

    // 未重写toString
    if(String.valueOf(obj).matches(defaultObjReg.toString())){
        return ReflectionToStringBuilder.toString(obj,
                style);
    }

    return obj.toString();
}
项目:communote-server    文件:IpRangeFilterManagementTest.java   
/**
 * Test create filter.
 *
 * @throws IpRangeException
 *             the ip range exception
 */
@Test
public void testCreateFilter() throws IpRangeException {
    AuthenticationTestUtils.setManagerContext();

    try {
        IpRangeFilterVO filter = ipRangeFilterManagement.createFilter(IP_FILTER_EMPTY, "", "");
        Assert.assertNotNull(filter, "got no filter");
        filter = ipRangeFilterManagement.createFilter(IP_FILTER_INCLUDING_CURRENT_IP,
                "127.0.0.1", "3.4.5.6");
        LOG.debug("filter: \n"
                + ToStringBuilder.reflectionToString(filter, ToStringStyle.MULTI_LINE_STYLE));
        filter = ipRangeFilterManagement.createFilter("IncludeFilter", "168.0.0.1", "");
        LOG.debug("filter: \n"
                + ToStringBuilder.reflectionToString(filter, ToStringStyle.MULTI_LINE_STYLE));
        filter = ipRangeFilterManagement.createFilter("IncludeFilter_2",
                "::168.0.0.1-::168.0.5.0", "");
        LOG.debug("filter: \n"
                + ToStringBuilder.reflectionToString(filter, ToStringStyle.MULTI_LINE_STYLE));
    } catch (IpRangeException e) {
        LOG.error(e + ", ip: '" + e.getIp() + "'", e);
        throw e;
    }
}
项目:communote-server    文件:TagCategoryManagementTest.java   
/**
 * Checks if the given tag category entity equals to the tag category value object.
 *
 * @param expected
 *            the expected values
 * @param actual
 *            the actual values
 */
private void checkTagCategoryData(GlobalTagCategoryVO expected, GlobalTagCategory actual) {
    ToStringBuilder s1 = new ToStringBuilder(ToStringStyle.MULTI_LINE_STYLE)
            .append("description", actual.getDescription()).append("name", actual.getName())
            .append("prefix", actual.getPrefix());
    boolean result = true;
    result = result && StringUtils.equals(expected.getDescription(), actual.getDescription());
    result = result && StringUtils.equals(expected.getName(), actual.getName());
    result = result && StringUtils.equals(expected.getPrefix(), actual.getPrefix());
    Assert.assertEquals(
            result,
            true,
            "value object and entity not equal, entity: "
                    + s1.toString()
                    + ", source vo: "
                    + ToStringBuilder.reflectionToString(expected,
                            ToStringStyle.MULTI_LINE_STYLE));
}
项目:openhab-hdl    文件:DatapointConfig.java   
/**
 * {@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();
}
项目:cas4.0.x-server-wechat    文件:AbstractRegisteredService.java   
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();
}
项目:instalint    文件:RuleFinderCompatibility.java   
@Override
public Rule find(RuleQuery query) {
  Collection<Rule> all = findAll(query);
  if (all.size() > 1) {
    throw new IllegalArgumentException("Non unique result for rule query: " + ReflectionToStringBuilder.toString(query, ToStringStyle.SHORT_PREFIX_STYLE));
  } else if (all.isEmpty()) {
    return null;
  } else {
    return all.iterator().next();
  }
}
项目:spring-i18n-support    文件:ExcelReader.java   
/**
 * Method parses a row of the body content and puts the related entry into the result list (entries).
 * If the row is invalid in any kind, no modification happens. If any of the parameters provided is null or invalid,
 * no modification happens.
 * 
 * @param entries the list of entries, where the result of the row should be put in
 * @param langKeys the language information to parse the row correctly
 * @param row the row to be processed.
 */
private void parseContentBodyRow(   List<MessageResourceEntry> entries,
                                    Map<Integer, Locale> langKeys,
                                    Row row,
                                    String type)
{
    if (entries == null || row == null || langKeys == null || langKeys.isEmpty())
    {
        return;
    }
    MessageResourceEntry entry = new MessageResourceEntry();
    String code = getCellStringValue(row.getCell(this.keyColumn));
    if (!StringUtils.isBlank(code))
    {
        entry.setCodeId(StringUtils.trim(code));
        for (int nameIndex = this.firstLanguageColumn; nameIndex <= langKeys.size(); nameIndex++)
        {
            Cell cell = row.getCell(nameIndex);
            String name = getCellStringValue(cell);
            if (!StringUtils.isBlank(name))
            {
                Locale lang = langKeys.get(nameIndex);
                entry.addLang(lang, name);
            }
        }
        if (entry.size() > 0)
        {
            entry.setType(type);
            entries.add(entry);
        }
    }
    if (LOG.isDebugEnabled())
    {
        LOG.debug(ToStringBuilder.reflectionToString(entry, ToStringStyle.SHORT_PREFIX_STYLE));
    }
}
项目:spring-i18n-support    文件:ExcelWriter.java   
/**
 * Extracts the language information form the data.
 * This method iterates all MessagaResourceEntries to get all available languages used in the data.
 * 
 * @param entries the entries to extract the used langs
 * @return the Map to map a certain language to a special column in the process of content row writing
 */
private Map<Locale, Integer> getLanguageInformation(List<MessageResourceEntry> entries)
{
    LOG.info("Extract language information");
    SortedSet<Locale> locales = new TreeSet<Locale>(new LocaleComparator());
    for (MessageResourceEntry entry : entries)
    {
        Map<Locale, String> mappings = entry.getNameMappings();
        if (mappings != null && !mappings.isEmpty())
        {
            for (Locale key : mappings.keySet())
            {
                locales.add(key);
            }
        }
    }
    Map<Locale, Integer> result = new HashMap<Locale, Integer>();
    int colIndex = this.firstLanguageColumn; // calculate the index column for new languages
    for (Locale locale : locales)
    {
        result.put(locale, colIndex);
        colIndex++;
    }
    if (LOG.isDebugEnabled())
    {
        LOG.debug("Extracted languages " + ToStringBuilder.reflectionToString(result, ToStringStyle.SHORT_PREFIX_STYLE));
    }
    return result;
}
项目:jta-atomikos    文件:TsysPost.java   
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("PostId", getPostId())
            .append("PostName", getPostName())
            .append("Remark", getRemark())
            .append("PostType", getPostType())
            .append("ParentPostid", getParentPostid()).toString();
}
项目:jta-atomikos    文件:TsysApp.java   
public String toString() {
    return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
        .append("AppId",getAppId())
        .append("AppName",getAppName())
        .append("AppIcon",getAppIcon())
        .append("OrderNo",getOrderNo())
        .append("AppPath",getAppPath())
        .append("AppShortname",getAppShortname())
        .toString();
}
项目:obevo    文件:Change.java   
protected ToStringBuilder toStringBuilder() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
            .append(this.getSchema())
            .append(this.getChangeName())
            .append(this.getObjectName())
            .append(this.getChangeType())
            .append(this.getContent())
            .append(this.getContentHash())
            .append(this.getOrderWithinObject())
            ;
}
项目:oma-riista-web    文件:UserInfo.java   
@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
            .append("username", getUsername())
            .append("userId", userId)
            .append("role", role)
            .toString();
}
项目:bee    文件:DefaultResponse.java   
@Override
public String toString() {
    if (this.messageType == Constants.MESSAGE_TYPE_SERVICE) {
        return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("serialize", serialize)
                .append("seq", seq).append("messageType", messageType).toString();
    } else {
        return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("serialize", serialize)
                .append("seq", seq).append("messageType", messageType).append("return", returnVal).toString();
    }
}
项目:bee    文件:DefaultRequest.java   
@Override
public String toString() {
    ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
            .append("serialize", serialize).append("seq", seq).append("msgType", messageType)
            .append("callType", callType).append("timeout", timeout).append("url", serviceName)
            .append("method", methodName).append("created", createMillisTime);
    if (Constants.REQUEST_LOG_PARAMETERS) {
        builder.append("parameters", JSON.toJSONString(parameters));
    }
    return builder.toString();
}
项目:mojito    文件:TextUnitSearcherTest.java   
@Transactional
@Test
public void testUnusedAndTranslated() {

    TMTestData tmTestData = new TMTestData(testIdWatcher);

    List<String> localeTags = new ArrayList<>();
    localeTags.add("ko-KR");
    localeTags.add("fr-FR");

    TextUnitSearcherParameters textUnitSearcherParameters = new TextUnitSearcherParameters();

    textUnitSearcherParameters.setRepositoryIds(tmTestData.repository.getId());
    textUnitSearcherParameters.setLocaleTags(localeTags);
    textUnitSearcherParameters.setStatusFilter(StatusFilter.TRANSLATED);
    textUnitSearcherParameters.setUsedFilter(UsedFilter.UNUSED);

    List<TextUnitDTO> textUnitDTOs = textUnitSearcher.search(textUnitSearcherParameters);

    for (TextUnitDTO textUnitDTO : textUnitDTOs) {
        logger.debug(ToStringBuilder.reflectionToString(textUnitDTO, ToStringStyle.MULTI_LINE_STYLE));
    }

    Iterator<TextUnitDTO> iterator = textUnitDTOs.iterator();

    TextUnitDTO next = iterator.next();
    assertEquals("Comment3", next.getComment());
    assertEquals(tmTestData.frFR.getId(), next.getLocaleId());
    assertEquals("TEST3", next.getName());
    assertEquals("Content3", next.getSource());
    assertEquals("Content3 fr-FR", next.getTarget());
    assertEquals("fr-FR", next.getTargetLocale());
    assertEquals(tmTestData.addTMTextUnit3.getId(), next.getTmTextUnitId());
    assertEquals(tmTestData.addCurrentTMTextUnitVariant3FrFR.getId(), next.getTmTextUnitVariantId());
    assertTrue(next.isTranslated());
    assertFalse(next.isUsed());

    assertFalse(iterator.hasNext());
}
项目:mojito    文件:TranslationKitServiceTest.java   
@Test
public void testGetTextUnitDTOsForTranslationKitfrFR() {

    tmTestData = new TMTestData(testIdWatcher);

    TranslationKit translationKit = translationKitService.addTranslationKit(
            dropService.createDrop(tmTestData.repository).getId(),
            tmTestData.frFR.getId(),
            TranslationKit.Type.TRANSLATION);

    List<TextUnitDTO> textUnitDTOsForTranslationKit = translationKitService.getTextUnitDTOsForTranslationKit(translationKit.getId(), TranslationKit.Type.TRANSLATION);

    for (TextUnitDTO textUnitDTO : textUnitDTOsForTranslationKit) {
        logger.debug(ToStringBuilder.reflectionToString(textUnitDTO, ToStringStyle.MULTI_LINE_STYLE));
    }

    Iterator<TextUnitDTO> iterator = textUnitDTOsForTranslationKit.iterator();
    TextUnitDTO next = iterator.next();
    assertEquals(tmTestData.asset.getId(), next.getAssetId());
    assertEquals("Comment2", next.getComment());
    assertEquals(tmTestData.frFR.getId(), next.getLocaleId());
    assertEquals("TEST2", next.getName());
    assertEquals("Content2", next.getSource());
    assertNull(next.getTarget());
    assertEquals("fr-FR", next.getTargetLocale());
    assertEquals(tmTestData.addTMTextUnit2.getId(), next.getTmTextUnitId());
    assertEquals(false, next.isTranslated());

    assertFalse(iterator.hasNext());
}
项目:mojito    文件:TranslationKitServiceTest.java   
@Test
public void testGetTextUnitDTOsForTranslationKitkoKR() {

    tmTestData = new TMTestData(testIdWatcher);

    TranslationKit translationKit = translationKitService.addTranslationKit(dropService.createDrop(
            tmTestData.repository).getId(),
            tmTestData.koKR.getId(),
            TranslationKit.Type.TRANSLATION);

    List<TextUnitDTO> textUnitDTOsForTranslationKit = translationKitService.getTextUnitDTOsForTranslationKit(translationKit.getId(), TranslationKit.Type.TRANSLATION);

    for (TextUnitDTO textUnitDTO : textUnitDTOsForTranslationKit) {
        logger.debug(ToStringBuilder.reflectionToString(textUnitDTO, ToStringStyle.MULTI_LINE_STYLE));
    }

    Iterator<TextUnitDTO> iterator = textUnitDTOsForTranslationKit.iterator();
    TextUnitDTO next = iterator.next();
    assertEquals(tmTestData.asset.getId(), next.getAssetId());
    assertEquals("Comment2", next.getComment());
    assertEquals(tmTestData.koKR.getId(), next.getLocaleId());
    assertEquals("TEST2", next.getName());
    assertEquals("Content2", next.getSource());
    assertNull(next.getTarget());
    assertEquals("ko-KR", next.getTargetLocale());
    assertEquals(tmTestData.addTMTextUnit2.getId(), next.getTmTextUnitId());
    assertEquals(false, next.isTranslated());

    assertFalse(iterator.hasNext());
}
项目:mojito    文件:TranslationKitServiceTest.java   
@Test
public void testGetTextUnitDTOsForTranslationKitfrCA() {

    tmTestData = new TMTestData(testIdWatcher);

    TranslationKit translationKit = translationKitService.addTranslationKit(
            dropService.createDrop(tmTestData.repository).getId(),
            tmTestData.frCA.getId(),
            TranslationKit.Type.TRANSLATION);

    List<TextUnitDTO> textUnitDTOsForTranslationKit = translationKitService.getTextUnitDTOsForTranslationKit(translationKit.getId(), TranslationKit.Type.TRANSLATION);

    for (TextUnitDTO textUnitDTO : textUnitDTOsForTranslationKit) {
        logger.debug(ToStringBuilder.reflectionToString(textUnitDTO, ToStringStyle.MULTI_LINE_STYLE));
    }

    Iterator<TextUnitDTO> iterator = textUnitDTOsForTranslationKit.iterator();
    TextUnitDTO next = iterator.next();
    assertEquals(tmTestData.asset.getId(), next.getAssetId());
    assertEquals("Comment1", next.getComment());
    assertEquals(tmTestData.frCA.getId(), next.getLocaleId());
    assertEquals("zuora_error_message_verify_state_province", next.getName());
    assertEquals("Please enter a valid state, region or province", next.getSource());
    assertNull(next.getTarget());
    assertEquals("fr-CA", next.getTargetLocale());
    assertEquals(tmTestData.addTMTextUnit1.getId(), next.getTmTextUnitId());
    assertEquals(false, next.isTranslated());
    assertFalse(iterator.hasNext());
}
项目:mojito    文件:TranslationKitServiceTest.java   
@Test
public void testGetTextUnitDTOsWithInheritanceForTranslationKitfrCA() {

    tmTestData = new TMTestData(testIdWatcher);

    TranslationKit translationKit = translationKitService.addTranslationKit(
            dropService.createDrop(tmTestData.repository).getId(),
            tmTestData.frCA.getId(),
            TranslationKit.Type.REVIEW);

    List<TextUnitDTO> textUnitDTOsForTranslationKit = translationKitService.getTextUnitDTOsForTranslationKitWithInheritance(translationKit.getId());

    for (TextUnitDTO textUnitDTO : textUnitDTOsForTranslationKit) {
        logger.debug(ToStringBuilder.reflectionToString(textUnitDTO, ToStringStyle.MULTI_LINE_STYLE));
    }

    Iterator<TextUnitDTO> iterator = textUnitDTOsForTranslationKit.iterator();
    TextUnitDTO next = iterator.next();
    assertEquals(tmTestData.asset.getId(), next.getAssetId());
    assertEquals("Comment1", next.getComment());
    assertEquals(tmTestData.frFR.getId(), next.getLocaleId());
    assertEquals("zuora_error_message_verify_state_province", next.getName());
    assertEquals("Please enter a valid state, region or province", next.getSource());
    assertEquals("fr-FR", next.getTargetLocale());
    assertEquals(tmTestData.addTMTextUnit1.getId(), next.getTmTextUnitId());
    assertEquals(tmTestData.addCurrentTMTextUnitVariant1FrFR.getContent(), next.getTarget());
    assertEquals(true, next.isTranslated());
    assertFalse(iterator.hasNext());
}
项目:dingding-app-server    文件:SmsServiceWrapImpl.java   
/**
 * 发送验证码
 * @param mobileNum 手机号
 * @param validCode 验证码内容
 * @param signName 短信签名
 * @param templateNum 模板号
 * @param opeateName 操作名称(日志用)
 * @return 发送是否成功
 */
private boolean sentValidCodeSms(String mobileNum, String validCode,String signName,String templateNum,String opeateName){
    AlibabaAliqinFcSmsNumSendRequest req = new AlibabaAliqinFcSmsNumSendRequest();
    req.setSmsType("normal");
    req.setSmsFreeSignName(signName);
    req.setSmsParamString("{\"code\":\"" + validCode + "\",\"product\":\" "+SMS_PRODUCT_NAME+" \"}");
    req.setRecNum(mobileNum);
    req.setSmsTemplateCode(templateNum);
    AlibabaAliqinFcSmsNumSendResponse rsp ;
    try {
        rsp = getSmsClient().execute(req);
        if (rsp==null){
            log.error("验证码-"+opeateName+"-失败:返回结果为null,mobile:{} validCode{}",mobileNum,validCode);
            return false;
        }else{
            if(!rsp.isSuccess()){
                log.error("验证码-"+opeateName+"-失败:返回结果失败:,mobile:{} code:{} response:{}",mobileNum,validCode, ReflectionToStringBuilder.toString(rsp, ToStringStyle.SIMPLE_STYLE));
                return false;
            }
        }
    } catch (ApiException e) {
        log.error("验证码-"+opeateName+"-失败:短信发送异常,mobile:"+mobileNum+" code:"+validCode, e);
    }

    log.info("验证码-"+opeateName+":发送成功,mobile:{} validCode:{}",mobileNum,validCode);
    return true;
}
项目:dingding-app-server    文件:LoginAccountController.java   
@RequestMapping("loginByPass")
@ResponseBody
public CommonResponse<LoginAccount> loginByPassword(@ValidateBody(requiredAttrs = {"mobile", "password"}) LoginAccountRequest body, RedisRequestSession session,CommonRequest request) {
    //TODO 调试完成候去掉,保护用户关键信息隐私
    log.info("密码登陆开始:入参:body:{},request:{}", ReflectionToStringBuilder.toString(body, ToStringStyle.SIMPLE_STYLE),ReflectionToStringBuilder.toString(request, ToStringStyle.SIMPLE_STYLE));
    CommonResponse<LoginAccount> response = loginAccountService.loginByPass(body.getMobile(), body.getPassword(), session,request);
    log.info("密码登陆完成:{}", ReflectionToStringBuilder.toString(response, ToStringStyle.SIMPLE_STYLE));
    return response;
}
项目:dingding-app-server    文件:LoginAccountController.java   
@RequestMapping(value = "loginByCode",method = {RequestMethod.POST})
@ResponseBody
public CommonResponse<LoginAccount> loginByCode(@ValidateBody(requiredAttrs = {"mobile", "verifyCode"}) LoginAccountRequest body, RedisRequestSession session,CommonRequest request) {
    log.info("验证码登陆开始:入参:body:{},request:{}", ReflectionToStringBuilder.toString(body, ToStringStyle.SIMPLE_STYLE),ReflectionToStringBuilder.toString(request, ToStringStyle.SIMPLE_STYLE));
    CommonResponse<LoginAccount> response  = loginAccountService.loginByVerifyCode(body.getMobile(), body.getVerifyCode(), session,request);
    log.info("验证码登陆完成:{}", ReflectionToStringBuilder.toString(response, ToStringStyle.SIMPLE_STYLE));
    return response;
}
项目:dingding-app-server    文件:LoginAccountController.java   
@RequestMapping("getRegVerifyCode")
@ResponseBody
public CommonResponse<String> getRegVerifyCode(@ValidateBody(requiredAttrs = "mobile") LoginAccountRequest body, RedisRequestSession session) {
    log.info("获取注册验证码开始:入参:body:{}", ReflectionToStringBuilder.toString(body, ToStringStyle.SIMPLE_STYLE));
    CommonResponse<String> response = loginAccountService.getRegVerifyCode(body.getMobile(), session);
    log.info("获取注册验证码完成:{}", ReflectionToStringBuilder.toString(response, ToStringStyle.SIMPLE_STYLE));
    return response;
}
项目:dingding-app-server    文件:LoginAccountController.java   
@RequestMapping("getLoginVerifyCode")
@ResponseBody
public CommonResponse<String> getLoginVerifyCode(@ValidateBody(requiredAttrs = "mobile") LoginAccountRequest body, RedisRequestSession session) {
    log.info("获取登陆验证码开始:入参:body:{}", ReflectionToStringBuilder.toString(body, ToStringStyle.SIMPLE_STYLE));
    CommonResponse<String> response = loginAccountService.getLoginVerifyCode(body.getMobile(), session);
    log.info("获取登陆验证码完成:{}", ReflectionToStringBuilder.toString(response, ToStringStyle.SIMPLE_STYLE));
    return response;
}
项目:dingding-app-server    文件:LoginAccountController.java   
@RequestMapping("reg")
@ResponseBody
public CommonResponse<LoginAccount> reg(@ValidateBody(requiredAttrs = {"mobile","verifyCode"}) LoginAccountRequest body, RedisRequestSession session,CommonRequest request) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
    log.info("注册开始:入参:body:{},request:{}", ReflectionToStringBuilder.toString(body, ToStringStyle.SIMPLE_STYLE),ReflectionToStringBuilder.toString(request, ToStringStyle.SIMPLE_STYLE));
    CommonResponse<LoginAccount> response = loginAccountService.registerAccount(body, session,request);
    log.info("注册完成:{}", ReflectionToStringBuilder.toString(response, ToStringStyle.SIMPLE_STYLE));
    return response;
}
项目:dingding-app-server    文件:LoginAccountController.java   
@RequestMapping("update")
@ResponseBody
public CommonResponse<LoginAccount> updateInfo(@ValidateBody(requiredAttrs = {"mobile"}) LoginAccountRequest body, RedisRequestSession session,CommonRequest request) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
    log.info("更新用户信息开始:入参:body:{},request:{}", ReflectionToStringBuilder.toString(body, ToStringStyle.SIMPLE_STYLE),ReflectionToStringBuilder.toString(request, ToStringStyle.SIMPLE_STYLE));
    CommonResponse<LoginAccount> response = loginAccountService.updateAccount(body, session,request);
    log.info("更新用户信息完成:{}", ReflectionToStringBuilder.toString(response, ToStringStyle.SIMPLE_STYLE));
    return response;
}
项目:cernunnos    文件:ReturnValueImpl.java   
/**
    * @see java.lang.Object#toString()
    */
@Override
   public String toString() {
       return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
           .append("value", this.value)
           .toString();
   }
项目:apex-core    文件:OperatorDeployInfo.java   
/**
 *
 * @return String
 */
@Override
public String toString()
{
  return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", this.id)
      .append("name", this.name)
      .append("type", this.type)
      .append("checkpoint", this.checkpoint)
      .append("inputs", this.inputs)
      .append("outputs", this.outputs)
      .toString();
}
项目:apex-core    文件:StreamContext.java   
@Override
public String toString()
{
  return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
          .append("sourceId", sourceId)
          .append("sinkId", sinkId)
          .toString();
}
项目:openyu-commons    文件:AuditEntitySupporter.java   
public String toString() {
    ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE);
    builder.appendSuper(super.toString());
    builder.append("createDate", createDate);
    builder.append("createUser", createUser);
    builder.append("modifiedDate", modifiedDate);
    builder.append("modifiedUser", modifiedUser);
    return builder.toString();
}
项目:openhab-hdl    文件:HomematicConfig.java   
@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
            .append("host", host).append("timeout", timeout)
            .append("callbackHost", callbackHost).append("callbackPort", callbackPort)
            .append("aliveInterval", reconnectInterval == null ? aliveInterval : "disabled")
            .append("reconnectInterval", reconnectInterval == null ? "disabled" : reconnectInterval).toString();
}
项目:openyu-commons    文件:IdNamesBeanSupporter.java   
public String toString() {
    ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE);
    builder.appendSuper(super.toString());
    builder.append("id", (id != null ? getId() : null));
    append(builder, "names", names);
    return builder.toString();
}
项目:openhab-hdl    文件:Weather.java   
/**
 * {@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();
}
项目:openhab-hdl    文件:HmDatapoint.java   
/**
 * Dumps all data to support better debugging.
 */
public String toDumpString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
            .append("address", channel.getDevice().getAddress()).append("channel", channel.getNumber())
            .append("parameter", name).append("value", value).append("valueType", valueType)
            .append("subType", subType).append("minValue", minValue).append("maxValue", maxValue)
            .append("valueList", valueList == null ? null : StringUtils.join(valueList, ","))
            .append("writeable", writeable).toString();
}
项目:openhab-hdl    文件:AstroBindingConfig.java   
@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();
}
项目:openhab-hdl    文件:ProviderConfig.java   
/**
 * {@inheritDoc}
 */
@Override
public String toString() {
    ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("providerName",
            providerName).append("apiKey", apiKey);
    if (apiKey2 != null) {
        tsb.append("apiKey2", apiKey2);
    }
    return tsb.toString();
}
项目:openyu-commons    文件:BaseEventSupporter.java   
public String toString() {
    ToStringBuilder builder = new ToStringBuilder(this,
            ToStringStyle.MULTI_LINE_STYLE);
    builder.append("type", type);
    builder.append("name", getName());
    builder.append("source", source);
    builder.append("attach", attach);
    return builder.toString();
}