dimanche 10 mai 2015

Why not check instance of java.lang.reflect.Field with java.util.List

i want check that field type is List or not but that giving an error

Incompatible conditional operand types Class<capture#5-of ?> and 
     List
- Incompatible conditional operand types Class<capture#6-of ?> and 
     List

how can i solve this please help thank you in advance

private void convert(Class<?> load) {

        Field[] fields = load.getDeclaredFields();
        int i = 0;
        for (Field field : fields) {
            Class<?> type = field.getType();
            if (type instanceof java.util.List) {
            }
        }
    }





Aucun commentaire:

Enregistrer un commentaire