Example usage for org.apache.commons.lang3.builder Person toString

List of usage examples for org.apache.commons.lang3.builder Person toString

Introduction

In this page you can find the example usage for org.apache.commons.lang3.builder Person toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:org.ruogu.lang3.builder.TestBuilder.java

public static void testToString() {
    System.out.println("------------testToString-------------");
    Person p = new Person();
    p.age = 12;//  w  w  w .  ja  va 2 s.co  m
    p.name = "tom";
    p.smoker = true;

    //org.ruogu.lang3.builder.Person@61de33
    System.out.println(p.toString());
    //org.ruogu.lang3.builder.Person@1270b73[name=tom,age=12,smoker=true]
    System.out.println(p.toString2());

    Car car = new Car();
    //??
    System.out.println(ToStringBuilder.reflectionToString(car, ToStringStyle.MULTI_LINE_STYLE));

}