void (String[] args) { final Field[] declaredFields = Inner.class.getDeclaredFields(); Field f = declaredFields[0]; Class<?> newType = f.getType(); if (newType.isAssignableFrom(Integer.class)) { // } else if (newType.isAssignableFrom(Integer.class)) { // } else if (newType.isAssignableFrom(Integer.class)) { // } }