com.tukeof.common.util.bean.BeanStringUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-core Show documentation
Show all versions of common-core Show documentation
a common and useful pure java library
The newest version!
package com.tukeof.common.util.bean;
import com.tukeof.common.annotation.Nullable;
import com.tukeof.common.util.ObjectUtil;
import com.tukeof.common.util.ReflectUtil;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Created by tuke on 2017/4/1.
*/
public class BeanStringUtil {
// ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
//bean to strings
public static String[] toStringArray(
Object bean,
Class... expandClasses) {
return toStringArray(bean, null, expandClasses);
}
public static String[] toStringArray(
Object bean,
Class extends Annotation>[] excludeAnnotations,
Class... expandClasses) {
List