validator = Class.forName(validatorName);
validator = getClassForType(validatorName);
    private void initSchemas(ActionServlet servlet, ModuleConfig config) throws ServletException {        Element root = readConfigRootElement(servlet, "schemas", getSchemas());        if (root != null) {            List schemaElements = root.getChildren("schema");            for (Iterator schemaIterator = schemaElements.iterator(); schemaIterator.hasNext();) {                Element schemaElement = (Element) schemaIterator.next();                String schemaName = schemaElement.getAttributeValue("name");                String typeName = schemaElement.getAttributeValue("type");                Class type;                try {                    type = Class.forName(typeName);                    Schema schema = new Schema(schemaName, type);                    List slotElements = schemaElement.getChildren("slot");                    for (Iterator slotIterator = slotElements.iterator(); slotIterator.hasNext();) {                        Element slotElement = (Element) slotIterator.next();                        String slotName      = slotElement.getAttributeValue("name");                        String layout        = slotElement.getAttributeValue("layout");                        String key           = slotElement.getAttributeValue("key");                        String slotSchema    = slotElement.getAttributeValue("schema");                        String validatorName = slotElement.getAttributeValue("validator");                        String defaultValue  = slotElement.getAttributeValue("default");                        Class validator = null;                                                if (validatorName != null) {                            try {                                validator = Class.forName(validatorName);                            } catch (ClassNotFoundException e) {                                logger.warn("specified validator '" + validatorName + "' does not exist");                            }                        }                                                Properties properties = new Properties();                        List propertyElements = slotElement.getChildren("property");                        for (Iterator propertyIterator = propertyElements.iterator(); propertyIterator                                .hasNext();) {                            Element propertyElement = (Element) propertyIterator.next();                            String name = propertyElement.getAttributeValue("name");                            String value = propertyElement.getAttributeValue("value");                            properties.setProperty(name, value);                        }                        SchemaSlotDescription slotDescription = new SchemaSlotDescription(slotName);                        slotDescription.setLayout(layout);                        slotDescription.setKey(key);                        slotDescription.setProperties(properties);                        slotDescription.setSchema(slotSchema);                        slotDescription.setValidator(validator);                        slotDescription.setDefaultValue(defaultValue);                                                schema.addSlotDescription(slotDescription);                    }                    logger.info("adding new schema: " + schema.getName());                    RenderKit.getInstance().registerSchema(schema);                } catch (ClassNotFoundException e) {                    e.printStackTrace();                }            }        }    }