Example usage for java.beans PropertyDescriptor PropertyDescriptor

List of usage examples for java.beans PropertyDescriptor PropertyDescriptor

Introduction

In this page you can find the example usage for java.beans PropertyDescriptor PropertyDescriptor.

Prototype

public PropertyDescriptor(String propertyName, Class<?> beanClass, String readMethodName,
        String writeMethodName) throws IntrospectionException 

Source Link

Document

This constructor takes the name of a simple property, and method names for reading and writing the property.

Usage

From source file:org.jasig.cas.client.validation.Cas20ProxyTicketValidatorBeanInfo.java

public PropertyDescriptor[] getPropertyDescriptors() {
    try {/*w  ww .  j  a  v  a 2 s .co m*/
        final PropertyDescriptor descriptor = new PropertyDescriptor("allowedProxyChains",
                Cas20ProxyTicketValidator.class, null, "setAllowedProxyChains") {
            public PropertyEditor createPropertyEditor(final Object bean) {
                return new ProxyListPropertyEditor();
            }
        };

        final PropertyDescriptor acceptAnyProxy = new PropertyDescriptor("acceptAnyProxy",
                Cas20ProxyTicketValidator.class, null, "setAcceptAnyProxy") {
            public PropertyEditor createPropertyEditor(final Object bean) {
                return new CustomBooleanEditor(true);
            }
        };

        return new PropertyDescriptor[] { descriptor, acceptAnyProxy };
    } catch (final IntrospectionException e) {
        throw new RuntimeException(e);
    }
}

From source file:org.mule.endpoint.URIBuilderBeanInfo.java

@Override
public PropertyDescriptor[] getPropertyDescriptors() {
    try {/*from  ww  w  .j  a v a2 s .  c o m*/
        Method setPort = URIBuilder.class.getMethod("setPort", new Class<?>[] { String.class });
        return new PropertyDescriptor[] {
                new PropertyDescriptor("address", URIBuilder.class, null, "setAddress"),
                new PropertyDescriptor("annotations", URIBuilder.class, null, "setAnnotations"),
                new PropertyDescriptor("host", URIBuilder.class, null, "setHost"),
                new PropertyDescriptor("meta", URIBuilder.class, null, "setMeta"),
                new PropertyDescriptor("password", URIBuilder.class, null, "setPassword"),
                new PropertyDescriptor("path", URIBuilder.class, null, "setPath"),
                new PropertyDescriptor("port", null, setPort),
                new PropertyDescriptor("protocol", URIBuilder.class, null, "setProtocol"),
                new PropertyDescriptor("queryMap", URIBuilder.class, null, "setQueryMap"),
                new PropertyDescriptor("user", URIBuilder.class, null, "setUser"), };
    } catch (Exception e) {
        logger.fatal("Error in bean introspection for URIBuilder, e");
    }
    return null;
}

From source file:org.displaytag.tags.CaptionTagBeanInfo.java

/**
 * @see java.beans.BeanInfo#getPropertyDescriptors()
 *//*from w w  w  . j a  v a 2s .  c  o  m*/
public PropertyDescriptor[] getPropertyDescriptors() {
    List proplist = new ArrayList();

    try {
        proplist.add(new PropertyDescriptor("class", //$NON-NLS-1$
                CaptionTag.class, null, "setClass")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("dir", //$NON-NLS-1$
                CaptionTag.class, null, "setDir")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("id", //$NON-NLS-1$
                CaptionTag.class, null, "setId")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("lang", //$NON-NLS-1$
                CaptionTag.class, null, "setLang")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("media", //$NON-NLS-1$
                CaptionTag.class, null, "setMedia")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("style", //$NON-NLS-1$
                CaptionTag.class, null, "setStyle")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("title", //$NON-NLS-1$
                CaptionTag.class, null, "setTitle")); //$NON-NLS-1$

        // make ATG Dynamo happy:
        // Attribute "className" of tag "caption" in taglib descriptor file displaytag-11.tld" must have a
        // corresponding property in class "org.displaytag.tags.CaptionTag" with a public setter method
        proplist.add(new PropertyDescriptor("className", //$NON-NLS-1$
                CaptionTag.class, null, "setClass")); //$NON-NLS-1$
    } catch (IntrospectionException ex) {
        throw new UnhandledException(
                "You got an introspection exception - maybe defining a property that is not"
                        + " defined in the CaptionTag?: " + ex.getMessage(),
                ex);
    }

    PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
    return ((PropertyDescriptor[]) proplist.toArray(result));
}

From source file:org.displaytag.tags.el.ELColumnTagBeanInfo.java

/**
 * @see java.beans.BeanInfo#getPropertyDescriptors()
 *///from  w  w w  . j  ava  2 s .  c o m
public PropertyDescriptor[] getPropertyDescriptors() {
    List proplist = new ArrayList();

    try {
        proplist.add(new PropertyDescriptor("autolink", //$NON-NLS-1$
                ELColumnTag.class, null, "setAutolink")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("escapeXml", //$NON-NLS-1$
                ELColumnTag.class, null, "setEscapeXml")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("class", //$NON-NLS-1$
                ELColumnTag.class, null, "setClass")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("decorator", //$NON-NLS-1$
                ELColumnTag.class, null, "setDecorator")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("group", //$NON-NLS-1$
                ELColumnTag.class, null, "setGroup")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("headerClass", //$NON-NLS-1$
                ELColumnTag.class, null, "setHeaderClass")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("href", //$NON-NLS-1$
                ELColumnTag.class, null, "setHref")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("maxLength", //$NON-NLS-1$
                ELColumnTag.class, null, "setMaxLength")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("maxWords", //$NON-NLS-1$
                ELColumnTag.class, null, "setMaxWords")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("media", //$NON-NLS-1$
                ELColumnTag.class, null, "setMedia")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("nulls", //$NON-NLS-1$
                ELColumnTag.class, null, "setNulls")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("paramId", //$NON-NLS-1$
                ELColumnTag.class, null, "setParamId")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("paramName", //$NON-NLS-1$
                ELColumnTag.class, null, "setParamName")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("paramProperty", //$NON-NLS-1$
                ELColumnTag.class, null, "setParamProperty")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("paramScope", //$NON-NLS-1$
                ELColumnTag.class, null, "setParamScope")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("property", //$NON-NLS-1$
                ELColumnTag.class, null, "setProperty")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("sortable", //$NON-NLS-1$
                ELColumnTag.class, null, "setSortable")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("sortName", //$NON-NLS-1$
                ELColumnTag.class, null, "setSortName")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("style", //$NON-NLS-1$
                ELColumnTag.class, null, "setStyle")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("total", //$NON-NLS-1$
                ELColumnTag.class, null, "setTotal")); // map //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("title", //$NON-NLS-1$
                ELColumnTag.class, null, "setTitle")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("titleKey", //$NON-NLS-1$
                ELColumnTag.class, null, "setTitleKey")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("url", //$NON-NLS-1$
                ELColumnTag.class, null, "setUrl")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("sortProperty", //$NON-NLS-1$
                ELColumnTag.class, null, "setSortProperty")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("comparator", //$NON-NLS-1$
                ELColumnTag.class, null, "setComparator")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("defaultorder", //$NON-NLS-1$
                ELColumnTag.class, null, "setDefaultorder")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("headerScope", //$NON-NLS-1$
                ELColumnTag.class, null, "setHeaderScope")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("scope", //$NON-NLS-1$
                ELColumnTag.class, null, "setScope")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("format", //$NON-NLS-1$
                ELColumnTag.class, null, "setFormat")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("value", //$NON-NLS-1$
                ELColumnTag.class, null, "setValue")); //$NON-NLS-1$

    } catch (IntrospectionException ex) {
        throw new UnhandledException(
                "You got an introspection exception - maybe defining a property that is not"
                        + " defined in the bean?: " + ex.getMessage(),
                ex);
    }

    PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
    return ((PropertyDescriptor[]) proplist.toArray(result));
}

From source file:org.displaytag.tags.el.ELTableTagBeanInfo.java

/**
 * @see java.beans.BeanInfo#getPropertyDescriptors()
 *//*from w  w  w. j av  a 2  s.c om*/
public PropertyDescriptor[] getPropertyDescriptors() {
    List proplist = new ArrayList();

    try {
        proplist.add(new PropertyDescriptor("cellpadding", //$NON-NLS-1$
                ELTableTag.class, null, "setCellpadding")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("cellspacing", //$NON-NLS-1$
                ELTableTag.class, null, "setCellspacing")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("class", //$NON-NLS-1$
                ELTableTag.class, null, "setClass")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("decorator", //$NON-NLS-1$
                ELTableTag.class, null, "setDecorator")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("defaultorder", //$NON-NLS-1$
                ELTableTag.class, null, "setDefaultorder")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("defaultsort", //$NON-NLS-1$
                ELTableTag.class, null, "setDefaultsort")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("export", //$NON-NLS-1$
                ELTableTag.class, null, "setExport")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("frame", //$NON-NLS-1$
                ELTableTag.class, null, "setFrame")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("length", //$NON-NLS-1$
                ELTableTag.class, null, "setLength")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("name", //$NON-NLS-1$
                ELTableTag.class, null, "setName")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("offset", //$NON-NLS-1$
                ELTableTag.class, null, "setOffset")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("pagesize", //$NON-NLS-1$
                ELTableTag.class, null, "setPagesize")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("partialList", //$NON-NLS-1$
                ELTableTag.class, null, "setPartialList")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("requestURI", //$NON-NLS-1$
                ELTableTag.class, null, "setRequestURI")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("requestURIcontext", //$NON-NLS-1$
                ELTableTag.class, null, "setRequestURIcontext")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("rules", //$NON-NLS-1$
                ELTableTag.class, null, "setRules")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("size", //$NON-NLS-1$
                ELTableTag.class, null, "setSize")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("sort", //$NON-NLS-1$
                ELTableTag.class, null, "setSort")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("style", //$NON-NLS-1$
                ELTableTag.class, null, "setStyle")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("summary", //$NON-NLS-1$
                ELTableTag.class, null, "setSummary")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("excludedParams", //$NON-NLS-1$
                ELTableTag.class, null, "setExcludedParams")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("id", //$NON-NLS-1$
                ELTableTag.class, null, "setUid")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("keepStatus", //$NON-NLS-1$
                ELTableTag.class, null, "setKeepStatus")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("clearStatus", //$NON-NLS-1$
                ELTableTag.class, null, "setClearStatus")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("form", //$NON-NLS-1$
                ELTableTag.class, null, "setForm")); //$NON-NLS-1$

        proplist.add(new PropertyDescriptor("uid", //$NON-NLS-1$
                ELTableTag.class, null, "setUid")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("htmlId", //$NON-NLS-1$
                ELTableTag.class, null, "setHtmlId")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("varTotals", //$NON-NLS-1$
                TableTag.class, null, "setVarTotals")); //$NON-NLS-1$

    } catch (IntrospectionException ex) {
        throw new UnhandledException(
                "You got an introspection exception - maybe defining a property that is not"
                        + " defined in the ElTableTag?: " + ex.getMessage(),
                ex);
    }

    PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
    return ((PropertyDescriptor[]) proplist.toArray(result));
}

From source file:org.displaytag.tags.ColumnTagBeanInfo.java

/**
 * @see java.beans.BeanInfo#getPropertyDescriptors()
 *///from  w  w w . ja va  2s  . c  o  m
public PropertyDescriptor[] getPropertyDescriptors() {
    List proplist = new ArrayList();

    try {
        proplist.add(new PropertyDescriptor("autolink", //$NON-NLS-1$
                ColumnTag.class, null, "setAutolink")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("escapeXml", //$NON-NLS-1$
                ColumnTag.class, null, "setEscapeXml")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("class", //$NON-NLS-1$
                ColumnTag.class, null, "setClass")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("decorator", //$NON-NLS-1$
                ColumnTag.class, null, "setDecorator")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("group", //$NON-NLS-1$
                ColumnTag.class, null, "setGroup")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("headerClass", //$NON-NLS-1$
                ColumnTag.class, null, "setHeaderClass")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("href", //$NON-NLS-1$
                ColumnTag.class, null, "setHref")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("maxLength", //$NON-NLS-1$
                ColumnTag.class, null, "setMaxLength")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("maxWords", //$NON-NLS-1$
                ColumnTag.class, null, "setMaxWords")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("media", //$NON-NLS-1$
                ColumnTag.class, null, "setMedia")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("nulls", //$NON-NLS-1$
                ColumnTag.class, null, "setNulls")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("paramId", //$NON-NLS-1$
                ColumnTag.class, null, "setParamId")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("paramName", //$NON-NLS-1$
                ColumnTag.class, null, "setParamName")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("paramProperty", //$NON-NLS-1$
                ColumnTag.class, null, "setParamProperty")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("paramScope", //$NON-NLS-1$
                ColumnTag.class, null, "setParamScope")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("property", //$NON-NLS-1$
                ColumnTag.class, null, "setProperty")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("sortable", //$NON-NLS-1$
                ColumnTag.class, null, "setSortable")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("sortName", //$NON-NLS-1$
                ColumnTag.class, null, "setSortName")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("style", //$NON-NLS-1$
                ColumnTag.class, null, "setStyle")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("title", //$NON-NLS-1$
                ColumnTag.class, null, "setTitle")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("titleKey", //$NON-NLS-1$
                ColumnTag.class, null, "setTitleKey")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("url", //$NON-NLS-1$
                ColumnTag.class, null, "setUrl")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("sortProperty", //$NON-NLS-1$
                ColumnTag.class, null, "setSortProperty")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("total", //$NON-NLS-1$
                ColumnTag.class, null, "setTotal")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("comparator", //$NON-NLS-1$
                ColumnTag.class, null, "setComparator")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("defaultorder", //$NON-NLS-1$
                ColumnTag.class, null, "setDefaultorder")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("headerScope", //$NON-NLS-1$
                ColumnTag.class, null, "setHeaderScope")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("scope", //$NON-NLS-1$
                ColumnTag.class, null, "setScope")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("format", //$NON-NLS-1$
                ColumnTag.class, null, "setFormat")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("value", //$NON-NLS-1$
                ColumnTag.class, null, "setValue")); //$NON-NLS-1$

        // make ATG Dynamo happy:
        proplist.add(new PropertyDescriptor("className", //$NON-NLS-1$
                ColumnTag.class, null, "setClass")); // map //$NON-NLS-1$

        // DISPL-242: handle new grouped title attribute
        proplist.add(new PropertyDescriptor("groupTitle", //$NON-NLS-1$
                ColumnTag.class, null, "setGroupTitle")); // map //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("groupTitleKey", //$NON-NLS-1$
                ColumnTag.class, null, "setGroupTitleKey")); // map //$NON-NLS-1$
    } catch (IntrospectionException ex) {
        throw new UnhandledException(
                "You got an introspection exception - maybe defining a property that is not"
                        + " defined in the ColumnTag?: " + ex.getMessage(),
                ex);
    }

    PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
    return ((PropertyDescriptor[]) proplist.toArray(result));
}

From source file:org.displaytag.tags.TableTagBeanInfo.java

/**
 * @see java.beans.BeanInfo#getPropertyDescriptors()
 *///w ww. j av a 2 s.c  om
public PropertyDescriptor[] getPropertyDescriptors() {
    List proplist = new ArrayList();

    try {
        proplist.add(new PropertyDescriptor("cellpadding", //$NON-NLS-1$
                TableTag.class, null, "setCellpadding")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("cellspacing", //$NON-NLS-1$
                TableTag.class, null, "setCellspacing")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("class", //$NON-NLS-1$
                TableTag.class, null, "setClass")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("decorator", //$NON-NLS-1$
                TableTag.class, null, "setDecorator")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("defaultorder", //$NON-NLS-1$
                TableTag.class, null, "setDefaultorder")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("defaultsort", //$NON-NLS-1$
                TableTag.class, null, "setDefaultsort")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("export", //$NON-NLS-1$
                TableTag.class, null, "setExport")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("frame", //$NON-NLS-1$
                TableTag.class, null, "setFrame")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("length", //$NON-NLS-1$
                TableTag.class, null, "setLength")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("offset", //$NON-NLS-1$
                TableTag.class, null, "setOffset")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("pagesize", //$NON-NLS-1$
                TableTag.class, null, "setPagesize")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("partialList", //$NON-NLS-1$
                TableTag.class, null, "setPartialList")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("requestURI", //$NON-NLS-1$
                TableTag.class, null, "setRequestURI")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("requestURIcontext", //$NON-NLS-1$
                TableTag.class, null, "setRequestURIcontext")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("rules", //$NON-NLS-1$
                TableTag.class, null, "setRules")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("sort", //$NON-NLS-1$
                TableTag.class, null, "setSort")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("style", //$NON-NLS-1$
                TableTag.class, null, "setStyle")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("summary", //$NON-NLS-1$
                TableTag.class, null, "setSummary")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("excludedParams", //$NON-NLS-1$
                TableTag.class, null, "setExcludedParams")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("id", //$NON-NLS-1$
                TableTag.class, null, "setUid")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("uid", //$NON-NLS-1$
                TableTag.class, null, "setUid")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("htmlId", //$NON-NLS-1$
                TableTag.class, null, "setHtmlId")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("varTotals", //$NON-NLS-1$
                TableTag.class, null, "setVarTotals")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("keepStatus", //$NON-NLS-1$
                TableTag.class, null, "setKeepStatus")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("clearStatus", //$NON-NLS-1$
                TableTag.class, null, "setClearStatus")); //$NON-NLS-1$
        proplist.add(new PropertyDescriptor("form", //$NON-NLS-1$
                TableTag.class, null, "setForm")); //$NON-NLS-1$

        // deprecated attributes
        proplist.add(new PropertyDescriptor("list", //$NON-NLS-1$
                TableTag.class, null, "setList")); //$NON-NLS-1$

        // 

        // Hexagon-added property, make the table non-customizable:
        proplist.add(new PropertyDescriptor("listTableName", TableTag.class, null, "setListTableName"));
        // Hexagon-added property, for screens with multiple tables, we need to know the db tableName:
        proplist.add(new PropertyDescriptor("nonConfigurable", TableTag.class, null, "setNonConfigurable"));

        // make ATG Dynamo happy:
        proplist.add(new PropertyDescriptor("className", //$NON-NLS-1$
                TableTag.class, null, "setClass")); //$NON-NLS-1$

        try {
            Class.forName("javax.servlet.jsp.tagext.IterationTag"); //$NON-NLS-1$
            // jsp >= 1.2
            proplist.add(new PropertyDescriptor("name", //$NON-NLS-1$
                    TableTag.class, null, "setName")); //$NON-NLS-1$
            proplist.add(new PropertyDescriptor("size", //$NON-NLS-1$
                    TableTag.class, null, "setSize")); //$NON-NLS-1$
        } catch (ClassNotFoundException e) {
            // jsp 1.1, can't use a setter with an Object parameter
            proplist.add(new PropertyDescriptor("name", //$NON-NLS-1$
                    TableTag.class, null, "setNameString")); //$NON-NLS-1$
            proplist.add(new PropertyDescriptor("size", //$NON-NLS-1$
                    TableTag.class, null, "setSizeObjectName")); //$NON-NLS-1$
        }

    } catch (IntrospectionException ex) {
        throw new UnhandledException(
                "You got an introspection exception - maybe defining a property that is not"
                        + " defined in the TableTag?: " + ex.getMessage(),
                ex);
    }

    PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
    return ((PropertyDescriptor[]) proplist.toArray(result));
}

From source file:org.drugis.addis.entities.treatment.ChoiceNode.java

public ChoiceNode(final Class<?> beanClass, final String propertyName) {
    d_beanClass = beanClass;/*from   w  w  w .ja v a2s.  co  m*/
    try {
        d_descriptor = new PropertyDescriptor(propertyName, beanClass,
                "get" + StringUtils.capitalize(propertyName), null);
    } catch (final IntrospectionException e) {
        throw new RuntimeException(e);
    }
}

From source file:info.magnolia.cms.taglibs.util.TableTagBeanInfo.java

/**
 * Instantiate a property descriptor for the given property.
 * @param propertyName property name/*  w w  w  . j  a v  a 2 s .c o  m*/
 * @return property descriptor
 * @throws IntrospectionException if the given property is not valid
 */
private PropertyDescriptor createPropertyDescriptor(String propertyName) throws IntrospectionException {
    return new PropertyDescriptor(propertyName, TableTag.class, null,
            "set" + StringUtils.capitalize(propertyName));
}

From source file:no.sesat.search.datamodel.generic.MapDataObjectBeanInfo.java

/**
 *
 * @param name/*from   w ww.j a  v  a2  s.  c o m*/
 * @param cls
 * @return
 */
public static PropertyDescriptor[] addSingleMappedPropertyDescriptor(final String name, final Class<?> cls) {

    try {
        final PropertyDescriptor[] existing = Introspector.getBeanInfo(cls, Introspector.IGNORE_ALL_BEANINFO)
                .getPropertyDescriptors();
        // remove this introspection from the cache to avoid reuse of the IGNORE_ALL_BEANINFO result
        Introspector.flushFromCaches(cls);

        final PropertyDescriptor[] result = new PropertyDescriptor[existing.length + 2];
        System.arraycopy(existing, 0, result, 0, existing.length);
        result[existing.length] = new MappedPropertyDescriptor(name, cls);
        if (!System.getProperty("java.version").startsWith("1.6")) {
            fixForJavaBug4984912(cls, (MappedPropertyDescriptor) result[existing.length]);
        }

        final String captialised = Character.toUpperCase(name.charAt(0)) + name.substring(1);
        try {
            // try plural with "s" first, then fall back onto "es"
            result[existing.length + 1] = new PropertyDescriptor(name + 's', cls, "get" + captialised + 's',
                    null);
        } catch (IntrospectionException ie) {
            // who on earth designed the english language!?? :@
            result[existing.length + 1] = new PropertyDescriptor(name + "es", cls, "get" + captialised + 's',
                    null);
        }
        return result;

    } catch (IntrospectionException ex) {
        LOG.error(ex.getMessage(), ex);
        throw new IllegalStateException('[' + cls.getSimpleName() + ']' + ex.getMessage(), ex);
    }
}