Java tutorial
//package com.java2s; import java.util.List; public class Main { private static void addClassName(List<Class<?>> clazzList, String clazzName) { if (clazzList != null && clazzName != null) { Class<?> clazz = null; try { clazz = Class.forName(clazzName); clazzList.add(clazz); } catch (ClassNotFoundException e) { e.printStackTrace(); } } } }