final Map<String, Class<?>> properties = new HashMap<String, Class<?>>();
properties.put("jobName", String.class);
properties.put("companyName", String.class);
properties.put("totalApplicantForJob", String.class);
final Class<?> beanClass = createBeanClass("ApplicantCountVsJobBoards", properties);
public static Class<?> createBeanClass (final String className, final Map<String, Class<?>> properties) {
final BeanGenerator beanGenerator = new BeanGenerator();
// NamingPolicy policy =
//beanGenerator.setNamingPolicy(null);
BeanGenerator.addProperties(beanGenerator, properties);
return (Class<?>) beanGenerator.createClass();
}
我将如何向这些类对象添加值。