Class componentTypeClass = classForName(componentType); return Array.newInstance(componentTypeClass, 0).getClass(); return classForName(type);
/** * Same as {@link #classForName(String)}, but throws a RuntimeException * (FacesException) instead of a ClassNotFoundException. * * @return the corresponding Class * @throws NullPointerException if type is null * @throws FacesException if class not found */ public static Class simpleClassForName(String type) { try { return classForName(type); } catch (ClassNotFoundException e) { log.error("Class " + type + " not found", e); throw new FacesException(e); } }
return (T) ClassUtils.classForName(param).newInstance();
Class servletClass = ClassUtils.classForName(registration.getClassName()); if (DELEGATE_FACES_SERVLET_INTERFACE_CLASS.isAssignableFrom(servletClass))
protected Converter createConverter() throws JspException { ELContext elContext = FacesContext.getCurrentInstance().getELContext(); org.apache.myfaces.commons.converter.EnumConverter converter = (org.apache.myfaces.commons.converter.EnumConverter)super.createConverter(); if (_targetClass != null) { if (_targetClass.isLiteralText()) { try { converter.setTargetClass( org.apache.myfaces.commons.util.ClassUtils.classForName(_targetClass.getExpressionString())); } catch (ClassNotFoundException e) { throw new JspException(e); } } else { converter.setTargetClass((java.lang.Class) _targetClass.getValue(elContext)); } } return converter; }
protected Converter createConverter() throws JspException { FacesContext facesContext = FacesContext.getCurrentInstance(); org.apache.myfaces.commons.converter.EnumConverter converter = (org.apache.myfaces.commons.converter.EnumConverter)super.createConverter(); if (_targetClass != null) { if (UIComponentTag.isValueReference(_targetClass)) { ValueBinding vb = facesContext.getApplication().createValueBinding(_targetClass); converter.setTargetClass((java.lang.Class) vb.getValue(facesContext)); } else { try { converter.setTargetClass( org.apache.myfaces.commons.util.ClassUtils.classForName(_targetClass)); } catch (ClassNotFoundException e) { throw new JspException(e); } } } return converter; }
public void setAttributes(FaceletContext ctx, Object obj) { super.setAttributes(ctx, obj); AbstractTypedNumberConverter c = (AbstractTypedNumberConverter) obj; if (this.destType != null) { if (this.destType.isLiteral()) { try { c.setDestType(org.apache.myfaces.commons.util.ClassUtils.classForName(this.destType.getValue())); } catch (ClassNotFoundException e) { throw new TagAttributeException(this.destType,"Cannot find class assigned: "+this.destType.getValue(),e); } } else { c.setDestType((Class) this.destType.getObject(ctx, Class.class)); } } }
public void setAttributes(FaceletContext ctx, Object obj) { super.setAttributes(ctx, obj); EnumConverter c = (EnumConverter) obj; if (this.targetClass != null) { if (this.targetClass.isLiteral()) { try { c.setTargetClass(org.apache.myfaces.commons.util.ClassUtils.classForName(this.targetClass.getValue())); } catch (ClassNotFoundException e) { throw new TagAttributeException(this.targetClass,"Cannot find class assigned: "+this.targetClass.getValue(),e); } } else { c.setTargetClass((Class) this.targetClass.getObject(ctx, Class.class)); } } }
public void setAttributes(FaceletContext ctx, Object obj) { super.setAttributes(ctx, obj); AbstractTypedNumberConverter c = (AbstractTypedNumberConverter) obj; if (this.destType != null) { if (this.destType.isLiteral()) { try { c.setDestType(org.apache.myfaces.commons.util.ClassUtils.classForName(this.destType.getValue())); } catch (ClassNotFoundException e) { throw new TagAttributeException(this.destType,"Cannot find class assigned: "+this.destType.getValue(),e); } } else { c.setValueExpression("destType", this.destType.getValueExpression(ctx, Object.class)); } } }
public void setAttributes(FaceletContext ctx, Object obj) { super.setAttributes(ctx, obj); EnumConverter c = (EnumConverter) obj; if (this.targetClass != null) { if (this.targetClass.isLiteral()) { try { c.setTargetClass(org.apache.myfaces.commons.util.ClassUtils.classForName(this.targetClass.getValue())); } catch (ClassNotFoundException e) { throw new TagAttributeException(this.targetClass,"Cannot find class assigned: "+this.targetClass.getValue(),e); } } else { c.setTargetClass((Class) this.targetClass.getObject(ctx, Class.class)); } } }
org.apache.myfaces.commons.util.ClassUtils.classForName(_destType));
org.apache.myfaces.commons.util.ClassUtils.classForName(_destType.getExpressionString()));