Java Code Examples for org.apache.commons.lang3.builder.ReflectionToStringBuilder

The following examples show how to use org.apache.commons.lang3.builder.ReflectionToStringBuilder. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: developerWorks   Source File: TournamentResultJdbcDao.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TournamentResult mapRow(ResultSet resultSet, int rowNum) throws SQLException {
  TournamentResult ret = new TournamentResult();
  //
  ret.setId(resultSet.getInt("id"));
  ret.setYear(resultSet.getInt("year"));
  ret.setGameDate(resultSet.getDate("game_date"));
  ret.setWinningTeamName(resultSet.getString("winning_team_name"));
  ret.setWinningScore(resultSet.getInt("winning_score"));
  ret.setLosingTeamName(resultSet.getString("losing_team_name"));
  ret.setLosingScore(resultSet.getInt("losing_score"));
  //
  if (log.isTraceEnabled()) {
    log.trace("Mapped row number " + rowNum + ", Object: " + ReflectionToStringBuilder.toString(ret));
  }
  //
  return ret;
}
 
Example 2
Source Project: springboot-shiro-cas-mybatis   Source File: ShiroRealm.java    License: MIT License 6 votes vote down vote up
@Override
	protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
		//UsernamePasswordToken对象用来存放提交的登录信息
        UsernamePasswordToken token=(UsernamePasswordToken) authenticationToken;

        log.info("验证当前Subject时获取到token为:" + ReflectionToStringBuilder.toString(token, ToStringStyle.MULTI_LINE_STYLE)); 
//        return new SimpleAuthenticationInfo("hsjhsj","8e24137dee97c9bbddb9a0cd6e043be4" , getName());
        return new SimpleAuthenticationInfo("hsjhsj","" , getName());
        //查出是否有此用户
//        TbUser user=null;
//        if(user!=null){
            // 若存在,将此用户存放到登录认证info中,无需自己做密码对比,Shiro会为我们进行密码对比校验
//            return new SimpleAuthenticationInfo(user.getUsername(), , getName());
//        }
//        return null;
	}
 
Example 3
Source Project: uyuni   Source File: DumpFilter.java    License: GNU General Public License v2.0 5 votes vote down vote up
private void logCookies(Cookie[] cookies) {
    if (cookies == null) {
        log.debug("There are NO cookies to log");
        return;
    }

    for (int i = 0; i < cookies.length; i++) {
        log.debug(ReflectionToStringBuilder.toString(cookies[i]));
    }
}
 
Example 4
Source Project: uyuni   Source File: DumpFilter.java    License: GNU General Public License v2.0 5 votes vote down vote up
private void logAttributes(HttpServletRequest req) {
    Enumeration items = req.getAttributeNames();
    while (items.hasMoreElements()) {
        String name = (String) items.nextElement();
        Object obj = req.getAttribute(name);
        if (obj != null) {
            log.debug("Attribute: name [" + name + "] value [" +
                ReflectionToStringBuilder.toString(obj) + "]");
        }
        else {
            log.debug("Attribute: name [" + name + "] value [null]");
        }
    }
}
 
Example 5
Source Project: seed   Source File: FastjsonTest.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 测试json解析为子类对象时,是否会解析包含的父类属性
 */
@Test
public void javabeanParse(){
    UserChild uc = new UserChild();
    uc.setId(2);
    uc.setName("玄玉");
    uc.setSex("M");
    String jsonStr = JSON.toJSONString(uc);
    System.out.println("生成了-->" + jsonStr);
    UserChild userChild = JSON.parseObject(jsonStr, UserChild.class);
    System.out.println("解析到-->" + ReflectionToStringBuilder.toString(userChild, ToStringStyle.MULTI_LINE_STYLE));
}
 
Example 6
Source Project: seed   Source File: WeixinHelper.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 微信支付--公众号支付--关闭订单
 * <p>
 *     该方法会判断接口返回报文中的状态是否成功,并验签(验签失败则直接抛RuntimeException)
 * </p>
 */
public static WeixinPayCloseorderRespData payCloseorder(WeixinPayCloseorderReqData reqData){
    LogUtil.getLogger().info("微信支付--公众号支付--关闭订单接口入参为{}", ReflectionToStringBuilder.toString(reqData, ToStringStyle.MULTI_LINE_STYLE));
    Map<String, String> reqDataMap = BeanUtil.beanToMap(reqData);
    reqDataMap.put("sign", CodecUtil.buildHexSign(reqDataMap, "UTF-8", reqData.getSign_type(), WeixinTokenHolder.getWeixinMchkey(reqData.getAppid())).toUpperCase());
    //发送请求
    String respXml = HTTPUtil.post(WeixinConstants.URL_WEIXIN_PAY_CLOSEORDER, XmlUtil.mapToXml(reqDataMap), null);
    //解析返回的xml字符串(交易是否成功、验签)
    Map<String, String> respXmlMap = XmlUtil.xmlToMap(respXml);
    payVerifyIfSuccess(respXmlMap);
    payVerifySign(respXmlMap, reqData.getAppid());
    WeixinPayCloseorderRespData respData = BeanUtil.mapTobean(respXmlMap, WeixinPayCloseorderRespData.class);
    LogUtil.getLogger().info("微信支付--公众号支付--关闭订单接口出参为{}", ReflectionToStringBuilder.toString(respData, ToStringStyle.MULTI_LINE_STYLE));
    return respData;
}
 
Example 7
Source Project: easyweb   Source File: BaseEntity.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 8
Source Project: Spring-Security-Third-Edition   Source File: PersistentLogin.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 9
Source Project: Spring-Security-Third-Edition   Source File: CalendarUser.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 10
Source Project: spring4-sandbox   Source File: Signup.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
	return ReflectionToStringBuilder.toString(this,
			ToStringStyle.MULTI_LINE_STYLE);
}
 
Example 11
Source Project: seldon-server   Source File: DimensionsMappingManager.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
 
Example 12
Source Project: Spring-Security-Third-Edition   Source File: CalendarUser.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 13
Source Project: Spring-Security-Third-Edition   Source File: CreateEventForm.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 14
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 15
Source Project: Spring-Security-Third-Edition   Source File: PersistentLogin.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 16
Source Project: async-gamequery-lib   Source File: SteamEconItemsSMTabChild.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, ToStringStyle.NO_CLASS_NAME_STYLE);
}
 
Example 17
Source Project: cineast   Source File: QueryConfig.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
}
 
Example 18
Source Project: pdfsam   Source File: StageStatus.java    License: GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 19
Source Project: Spring-Security-Third-Edition   Source File: Event.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 20
Source Project: Spring-Security-Third-Edition   Source File: Event.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 21
Source Project: FX-AlgorithmTrading   Source File: AbstractEvent.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    // 自分と中身のEventを表示する
    return (new ReflectionToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).toString()) + " "
            + (new ReflectionToStringBuilder(getContent(), ToStringStyle.SHORT_PREFIX_STYLE).toString());
}
 
Example 22
Source Project: FX-AlgorithmTrading   Source File: OHLC.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).toString();
}
 
Example 23
Source Project: Spring-Security-Third-Edition   Source File: CalendarUser.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 24
Source Project: Spring-Security-Third-Edition   Source File: Event.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 25
Source Project: Spring-Security-Third-Edition   Source File: Role.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 26
Source Project: digitalocean-api-java   Source File: DomainRecord.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
  return ReflectionToStringBuilder.toString(this);
}
 
Example 27
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, ToStringStyle.NO_CLASS_NAME_STYLE);
}
 
Example 28
@Override
public String toString() {
	return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
 
Example 29
Source Project: Spring-Security-Third-Edition   Source File: SignupForm.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 30
Source Project: KeenClient-Java   Source File: DatasetQuery.java    License: MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}