Here you can find the source of canConvert(Class> clz)
Parameter | Description |
---|
public static boolean canConvert(Class<?> clz)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.joda.time.DateTime; import org.joda.time.LocalDate; public class Main { @SuppressWarnings("serial") private static final List<Class<?>> TRANSFERABLES = new ArrayList<Class<?>>() { {/* w w w . j a v a 2s . c o m*/ add(Date.class); add(java.sql.Date.class); add(DateTime.class); add(LocalDate.class); add(BigDecimal.class); add(SimpleDateFormat.class); } }; /** * Returns true if the given class can be converted. * The following classes are supported: * java.util.Date, org.joda.time.DateTime, org.joda.time.LocalDate, BigDecimal * @param clz, Class<?> * @return boolean */ public static boolean canConvert(Class<?> clz) { return TRANSFERABLES.contains(clz); } }