public Class getManagedBeanClass() { if (beanClassName == null) { return null; } if (beanClass == null) { beanClass = ClassUtils.simpleClassForName(beanClassName); } return beanClass; }
public Class<?> getManagedBeanClass() { if (beanClassName == null) { return null; } if (beanClass == null) { beanClass = ClassUtils.simpleClassForName(beanClassName); } return beanClass; }
public Class<?> getManagedBeanClass() { if (beanClassName == null) { return null; } if (beanClass == null) { beanClass = ClassUtils.simpleClassForName(beanClassName); } return beanClass; }
private Class<?> getObjectFromClassMap(String id, Map<String, Object> classMap) { Object obj = classMap.get(id); if(obj == null){ return null; //object for this id wasn't found on the map } if(obj instanceof Class<?>) { return (Class<?>)obj; }else if (obj instanceof String ){ Class<?> clazz = ClassUtils.simpleClassForName((String)obj); classMap.put(id, clazz); return clazz; } //object stored in the map for this id is an invalid type. remove it and return null classMap.remove(id); return null; }
private Class<?> getObjectFromClassMap(String id, Map<String, Object> classMap) { Object obj = classMap.get(id); if(obj == null){ return null; //object for this id wasn't found on the map } if(obj instanceof Class<?>) { return (Class<?>)obj; }else if (obj instanceof String ){ Class<?> clazz = ClassUtils.simpleClassForName((String)obj); classMap.put(id, clazz); return clazz; } //object stored in the map for this id is an invalid type. remove it and return null classMap.remove(id); return null; }
public static Object newInstance(String type) throws FacesException { if (type == null) return null; return newInstance(simpleClassForName(type)); }
public static Object newInstance(String type) throws FacesException { if (type == null) return null; return newInstance(simpleClassForName(type)); }
public static Object newInstance(String type) throws FacesException { if (type == null) return null; return newInstance(simpleClassForName(type)); }
public static Object newInstance(String type, Class[] expectedTypes) { if (type == null) return null; Class clazzForName = simpleClassForName(type); if(expectedTypes != null) { for (int i = 0, size = expectedTypes.length; i < size; i++) { if (!expectedTypes[i].isAssignableFrom(clazzForName)) { throw new FacesException("'" + type + "' does not implement expected type '" + expectedTypes[i] + "'"); } } } return newInstance(clazzForName); }
public static Object newInstance(String type, Class[] expectedTypes) { if (type == null) return null; Class clazzForName = simpleClassForName(type); if(expectedTypes != null) { for (int i = 0, size = expectedTypes.length; i < size; i++) { if (!expectedTypes[i].isAssignableFrom(clazzForName)) { throw new FacesException("'" + type + "' does not implement expected type '" + expectedTypes[i] + "'"); } } } return newInstance(clazzForName); }
public static Object newInstance(String type, Class[] expectedTypes) { if (type == null) return null; Class clazzForName = simpleClassForName(type); if(expectedTypes != null) { for (int i = 0, size = expectedTypes.length; i < size; i++) { if (!expectedTypes[i].isAssignableFrom(clazzForName)) { throw new FacesException("'" + type + "' does not implement expected type '" + expectedTypes[i] + "'"); } } } return newInstance(clazzForName); }
@Override public void addComponent(String componentType, String componentClassName) { checkNull(componentType, "componentType"); checkEmpty(componentType, "componentType"); checkNull(componentClassName, "componentClassName"); checkEmpty(componentClassName, "componentClassName"); try { _componentClassMap.put(componentType, ClassUtils.simpleClassForName(componentClassName)); if (log.isTraceEnabled()) log.trace("add Component class = " + componentClassName + " for type = " + componentType); } catch (Exception e) { log.error("Component class " + componentClassName + " not found", e); } }
@Override public void addValidator(String validatorId, String validatorClass) { checkNull(validatorId, "validatorId"); checkEmpty(validatorId, "validatorId"); checkNull(validatorClass, "validatorClass"); checkEmpty(validatorClass, "validatorClass"); try { _validatorClassMap.put(validatorId, ClassUtils.simpleClassForName(validatorClass)); if (log.isTraceEnabled()) log.trace("add Validator id = " + validatorId + " class = " + validatorClass); } catch (Exception e) { log.error("Validator class " + validatorClass + " not found", e); } }
@Override public void addConverter(String converterId, String converterClass) { checkNull(converterId, "converterId"); checkEmpty(converterId, "converterId"); checkNull(converterClass, "converterClass"); checkEmpty(converterClass, "converterClass"); try { _converterIdToClassMap.put(converterId, ClassUtils.simpleClassForName(converterClass)); if (log.isTraceEnabled()) log.trace("add Converter id = " + converterId + " converterClass = " + converterClass); } catch (Exception e) { log.error("Converter class " + converterClass + " not found", e); } }
@Override public final void addComponent(final String componentType, final String componentClassName) { checkNull(componentType, "componentType"); checkEmpty(componentType, "componentType"); checkNull(componentClassName, "componentClassName"); checkEmpty(componentClassName, "componentClassName"); try { if(isLazyLoadConfigObjects()) _componentClassMap.put(componentType, componentClassName); else _componentClassMap.put(componentType, ClassUtils.simpleClassForName(componentClassName)); if (log.isLoggable(Level.FINEST)) log.finest("add Component class = " + componentClassName + " for type = " + componentType); } catch (Exception e) { log.log(Level.SEVERE, "Component class " + componentClassName + " not found", e); } }
@Override public final void addConverter(final String converterId, final String converterClass) { checkNull(converterId, "converterId"); checkEmpty(converterId, "converterId"); checkNull(converterClass, "converterClass"); checkEmpty(converterClass, "converterClass"); try { if(isLazyLoadConfigObjects()) _converterIdToClassMap.put(converterId, converterClass); else _converterIdToClassMap.put(converterId, ClassUtils.simpleClassForName(converterClass)); if (log.isLoggable(Level.FINEST)) log.finest("add Converter id = " + converterId + " converterClass = " + converterClass); } catch (Exception e) { log.log(Level.SEVERE, "Converter class " + converterClass + " not found", e); } }
@Override public final void addComponent(final String componentType, final String componentClassName) { checkNull(componentType, "componentType"); checkEmpty(componentType, "componentType"); checkNull(componentClassName, "componentClassName"); checkEmpty(componentClassName, "componentClassName"); try { if(isLazyLoadConfigObjects()) _componentClassMap.put(componentType, componentClassName); else _componentClassMap.put(componentType, ClassUtils.simpleClassForName(componentClassName)); if (log.isLoggable(Level.FINEST)) log.finest("add Component class = " + componentClassName + " for type = " + componentType); } catch (Exception e) { log.log(Level.SEVERE, "Component class " + componentClassName + " not found", e); } }
@Override public void addBehavior(String behaviorId, String behaviorClass) { checkNull(behaviorId, "behaviorId"); checkEmpty(behaviorId, "behaviorId"); checkNull(behaviorClass, "behaviorClass"); checkEmpty(behaviorClass, "behaviorClass"); try { if(isLazyLoadConfigObjects()) _behaviorClassMap.put(behaviorId, behaviorClass); else _behaviorClassMap.put(behaviorId, ClassUtils.simpleClassForName(behaviorClass)); if (log.isLoggable(Level.FINEST)) log.finest("add Behavior class = " + behaviorClass + " for id = " + behaviorId); } catch (Exception e) { log.log(Level.SEVERE, "Behavior class " + behaviorClass + " not found", e); } }
@Override public final void addValidator(final String validatorId, final String validatorClass) { checkNull(validatorId, "validatorId"); checkEmpty(validatorId, "validatorId"); checkNull(validatorClass, "validatorClass"); checkEmpty(validatorClass, "validatorClass"); try { if(isLazyLoadConfigObjects()) _validatorClassMap.put(validatorId, validatorClass); else _validatorClassMap.put(validatorId, ClassUtils.simpleClassForName(validatorClass)); if (log.isLoggable(Level.FINEST)) log.finest("add Validator id = " + validatorId + " class = " + validatorClass); } catch (Exception e) { log.log(Level.SEVERE, "Validator class " + validatorClass + " not found", e); } }
@Override public final void addConverter(final String converterId, final String converterClass) { checkNull(converterId, "converterId"); checkEmpty(converterId, "converterId"); checkNull(converterClass, "converterClass"); checkEmpty(converterClass, "converterClass"); try { if(isLazyLoadConfigObjects()) _converterIdToClassMap.put(converterId, converterClass); else _converterIdToClassMap.put(converterId, ClassUtils.simpleClassForName(converterClass)); if (log.isLoggable(Level.FINEST)) log.finest("add Converter id = " + converterId + " converterClass = " + converterClass); } catch (Exception e) { log.log(Level.SEVERE, "Converter class " + converterClass + " not found", e); } }