com.tuyang.beanutils.internal.convertors.EnumToStringArrayConvertor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of BeanUtils Show documentation
Show all versions of BeanUtils Show documentation
BeanUtils library is a Java bean copy utility with powerful functionality and high performance.
The newest version!
package com.tuyang.beanutils.internal.convertors;
import com.tuyang.beanutils.BeanCopyConvertor;
@SuppressWarnings("rawtypes")
public class EnumToStringArrayConvertor implements BeanCopyConvertor {
@Override
public String[] convertTo(Enum[] object) {
if( object == null )
return null;
String[] retList = new String[object.length];
int i =0;
for( Enum enum1 : object ) {
retList[i++] = enum1.toString();
}
return retList;
}
}