Class<?> getBeanClass() { return this.beanInfo.getBeanDescriptor().getBeanClass(); }
Class<?> getBeanClass() { return this.beanInfo.getBeanDescriptor().getBeanClass(); }
Class getBeanClass() { return this.beanInfo.getBeanDescriptor().getBeanClass(); }
throws ValidationException { BeanDescriptor beanDescriptor = beanInfo.getBeanDescriptor(); Class type = beanDescriptor.getBeanClass();
private Class<?> getBeanClass() { return (beanDescriptor != null) ? beanDescriptor.getBeanClass() : null; }
/** * Return true if the BeanInto describes one of our beans */ public static final boolean isHtmlBean(BeanInfo bi) { return bi.getBeanDescriptor().getBeanClass().getName().startsWith(PACKAGE); }
/** * Return the taglib URI for a bean described by a BeanInfo iff it is our bean */ public static final String getBeanTaglibUri(BeanInfo bi) { String cname = bi.getBeanDescriptor().getBeanClass().getName(); if (cname.startsWith(JSP_PAGE_CLASSBASE)) return FacesPageUnit.URI_JSP_PAGE; if (cname.startsWith(JSF_CORE_CLASSBASE)) return FacesPageUnit.URI_JSF_CORE; return null; // html }
/** * @return the type of this bean */ public Class getType() { return beanInfo.getBeanDescriptor().getBeanClass(); }
private static Class<?> getBeanClass(BeanInfo beanInfo) { return (Class<?>) beanInfo.getBeanDescriptor().getBeanClass(); } }
public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(descriptor.getBeanClass()); if (propertyDescriptors != null && propertyDescriptors.size() > 0) { out.writeObject(propertyDescriptors.size()); for (PropertyDescriptor propertyDescriptor : propertyDescriptors) { out.writeObject(propertyDescriptor.getName()); out.writeObject(propertyDescriptor.getValue("type")); } } else { out.writeObject(0); } }
/** * Return whether a bean described by a BeanInto is an html bean * * @param beanInfo * @return */ public static final boolean isHtmlBean(BeanInfo beanInfo) { return beanInfo.getBeanDescriptor().getBeanClass().getName().startsWith(HtmlBean.PACKAGE); }
/** * Return the taglib prefix for a bean described by a BeanInfo iff it is our bean */ public static final String getBeanTaglibPrefix(BeanInfo bi) { String cname = bi.getBeanDescriptor().getBeanClass().getName(); if (cname.startsWith(JSP_PAGE_CLASSBASE)) return "jsp"; if (cname.startsWith(JSF_CORE_CLASSBASE)) return "f"; return null; // html }
/** * Return whether a bean described by a BeanInto is a faces component bean (UIComponent) * * @param beanInfo * @return */ public static final boolean isFacesBean(BeanInfo beanInfo) { return UIComponent.class.isAssignableFrom(beanInfo.getBeanDescriptor().getBeanClass()); }
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(descriptor.getBeanClass()); if (propertyDescriptors != null && propertyDescriptors.size() > 0) { out.writeObject(propertyDescriptors.size()); for (PropertyDescriptor propertyDescriptor : propertyDescriptors) { out.writeObject(propertyDescriptor.getName()); out.writeObject(propertyDescriptor.getValue("type")); } } else { out.writeObject(0); } }
/** * Return the tag for a bean described by a BeanInfo iff it is our bean */ public static final String getBeanTagName(BeanInfo bi) { String cname = bi.getBeanDescriptor().getBeanClass().getName(); if (cname.startsWith(JSP_PAGE_CLASSBASE)) return tagFromClasstail(cname.substring(JSP_PAGE_CLASSBASE_LEN)); if (cname.startsWith(JSF_CORE_CLASSBASE)) return tagFromClasstail(cname.substring(JSF_CORE_CLASSBASE_LEN)); return tagFromClasstail(cname.substring(PACKAGE_LEN)); }
public static boolean equals(BeanDescriptor descriptor1, BeanDescriptor descriptor2) { return equals((FeatureDescriptor) descriptor1, (FeatureDescriptor) descriptor2) && nullEquals(descriptor1.getBeanClass(), descriptor2.getBeanClass()) && nullEquals(descriptor1.getCustomizerClass(), descriptor2.getCustomizerClass()); }
/** * @param bean * @param type * @return */ protected Bean firstBeanOfType(Bean bean, Class type) { if (type.isAssignableFrom(bean.getBeanInfo().getBeanDescriptor().getBeanClass())) return bean; Bean[] kids = bean.getChildren(); return kids != null ? firstBeanOfType(kids, type) : null; }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor instruction = new PropertyDescriptor("instruction", getBeanDescriptor().getBeanClass()); instruction.setBound(true); instruction.setPropertyEditorClass(JTextFieldEditor.class); instruction.setDisplayName("<html><font color='green'>Question:"); instruction.setShortDescription("Question to present to the user in the workflow panel. "); PropertyDescriptor rv[] = { instruction }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor index = new PropertyDescriptor("index", getBeanDescriptor().getBeanClass()); index.setBound(true); index.setPropertyEditorClass(IncrementEditor.class); index.setDisplayName("<html><font color='green'>Concept tab:"); index.setShortDescription("Index of tab deselect all toggles. "); PropertyDescriptor rv[] = { index }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor show = new PropertyDescriptor("show", getBeanDescriptor().getBeanClass()); show.setBound(true); show.setPropertyEditorClass(CheckboxEditor.class); show.setDisplayName("<html><font color='green'>Show signpost panel"); show.setShortDescription("Choose whether to show the signpost panel."); PropertyDescriptor rv[] = { show }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }