public void forAllAttributes(String template, Properties attributes) throws XDocletException
    {
        String tagName = attributes.getProperty("tagName");
        
        if(DEBUG) logger.debug("Handling tagName: " + tagName);
        //System.out.println("type: " + getCurrentClass().getQualifiedName());

        setCurrentTagName(tagName);
        
        boolean genTldx = getCurrentTagName().equals(NETUI_TLDX_ATTRIBUTE);

        try
        {
            XClass currentClass = getCurrentClass();
            
            if(DEBUG) 
            {
                logger.debug("handle class: " + currentClass.getName());
                XClass parent = currentClass.getSuperclass();
                while(parent != null)
                {
                    logger.debug("superclass: " + parent.getName());
                    if(parent.getName().equals("DataSourceTag"))
                    {
                        Iterator tmp = parent.getMethods().iterator();
                        if(tmp.hasNext())
                        {
                            logger.debug("found methods on DataSourceTag");
                            while(tmp.hasNext())
                            {
                                logger.debug("method: " + tmp.next());
                            }
                        }
                        else logger.debug("found NO methods on DataSourceTag");
                    }
                    
                    parent = parent.getSuperclass();
                }
            }

            if (currentClass == null) 
                throw new XDocletException("currentClass == null!!!");

            // need to check all methods
            Collection members = currentClass.getMethods(true);
            
            // sort fields, but we should make a copy first, because members is not a new copy, it's shared by all
            List sortedMembers = new ArrayList(members);
            Collections.sort(sortedMembers, memberComparator);
            members = sortedMembers;
            
            // for all XMethods
            Iterator methods = members.iterator();
            while(methods.hasNext())
            {
                XMethod xm = (XMethod)methods.next();
                
                if(DEBUG) logger.debug("handle method: " + xm.getName());
                
                // if(DEBUG) logger.debug("found @jsp:attribute tag on method: " + tldAttribute);
                
                // to create a TLD entry
                // 1) @netui:attribute
                // 2) @netui:attribute name="propName" -- use this for a class-level attribute when there can't be a method level one

                // to create a TLDX entry
                // 0) @netui:attribute -- there are not TLDX properties, but the attribute still needs to be created
                // 1) @netui.tldx:attribute -- specify TLDX properties
                // 2) @netui.tldx:attribute name="propName" -- use this for a class-level attribute when there can't be a method level one

                // get all @netui:attribute annotated methods
                XTag tldAttribute = getFirstTag(getCurrentClass(), xm.getName(), NETUI_ATTRIBUTE);

                //if(tldAttribute == null) continue;
                //setCurrentMethod(xm);

                // @netui.tldx:attribute
                if(tldAttribute != null)
                {
                    if(genTldx)
                    {
                        // if the attribute has been omitted in the TLD, omit in the TLDX
                        // 
                        // @todo: this needs to happen from the class-level
                        // 
                        XTag classTldOverride = getOverrideClassTag(xm.getPropertyName(), NETUI_ATTRIBUTE, getCurrentClass());
                        if(classTldOverride != null && TypeConversionUtil.stringToBoolean(classTldOverride.getAttributeValue("hide"), false))
                            continue;

                        // get the first @netui.tldx:attribute tag if it exists
                        XTag tldxAttribute = getFirstTag(getCurrentClass(), xm.getName(), NETUI_TLDX_ATTRIBUTE);
                        
                        // if(DEBUG) logger.debug("found @netui.tldx:attribute tag on method: " + tldxAttribute);
                        
                        if(tldxAttribute != null)
                            setCurrentMethodTag(tldxAttribute);
                    }
                    // @netui-tld:attribute
                    else if(tldAttribute != null)
                        setCurrentMethodTag(tldAttribute);
                     
                    XTag tag = getOverrideClassTag(xm.getPropertyName(), getCurrentTagName(), getCurrentClass());
                    
                    if(tag != null)
                        setCurrentClassTag(tag);

                    setCurrentMethod(xm);
                }
                else
                {
//                     System.out.println("***** search for class override: " + xm.getPropertyName());
//                     XTag tag = getOverrideClassTag(xm.getPropertyName(), getCurrentTagName(), getCurrentClass());
//                     System.out.println("method: " + xm.getName() + " found class override: " + tag);

//                     if(tag != null)
//                     {
//                         setCurrentMethod(xm);
//                         setCurrentClassTag(tag);
//                     }
                }
                    
                if(getCurrentMethod() != null)
                {
                    if(getCurrentClassTag() == null ||
                       !TypeConversionUtil.stringToBoolean(getCurrentClassTag().getAttributeValue("hide"), false))
                    {
                        generate(template);
                    }
                }

                setCurrentMethodTag(null);
                setCurrentClassTag(null);
                setCurrentMethod(null);
            }
            setCurrentClass(currentClass);
        }
        catch(Exception e)
        {
            e.printStackTrace();
            throw new XDocletException(e, "An error occurred in the forAllAttributes tag: " + e);
        }
    }
public void forAllAttributes ( String template , Properties attributes ) throws XDocletException { String tagName = attributes . getProperty ( "tagName" ) ; if ( DEBUG ) logger . debug ( "Handling tagName: " + tagName ) ; setCurrentTagName ( tagName ) ; boolean genTldx = getCurrentTagName ( ) . equals ( NETUI_TLDX_ATTRIBUTE ) ; try { XClass currentClass = getCurrentClass ( ) ; if ( DEBUG ) { logger . debug ( "handle class: " + currentClass . getName ( ) ) ; XClass parent = currentClass . getSuperclass ( ) ; while ( parent != null ) { logger . debug ( "superclass: " + parent . getName ( ) ) ; if ( parent . getName ( ) . equals ( "DataSourceTag" ) ) { Iterator tmp = parent . getMethods ( ) . iterator ( ) ; if ( tmp . hasNext ( ) ) { logger . debug ( "found methods on DataSourceTag" ) ; while ( tmp . hasNext ( ) ) { logger . debug ( "method: " + tmp . next ( ) ) ; } } else logger . debug ( "found NO methods on DataSourceTag" ) ; } parent = parent . getSuperclass ( ) ; } } if ( currentClass == null ) throw new XDocletException ( "currentClass == null!!!" ) ; Collection members = currentClass . getMethods ( true ) ; List sortedMembers = new ArrayList ( members ) ; Collections . sort ( sortedMembers , memberComparator ) ; members = sortedMembers ; Iterator methods = members . iterator ( ) ; while ( methods . hasNext ( ) ) { XMethod xm = ( XMethod ) methods . next ( ) ; if ( DEBUG ) logger . debug ( "handle method: " + xm . getName ( ) ) ; XTag tldAttribute = getFirstTag ( getCurrentClass ( ) , xm . getName ( ) , NETUI_ATTRIBUTE ) ; if ( tldAttribute != null ) { if ( genTldx ) { XTag classTldOverride = getOverrideClassTag ( xm . getPropertyName ( ) , NETUI_ATTRIBUTE , getCurrentClass ( ) ) ; if ( classTldOverride != null && TypeConversionUtil . stringToBoolean ( classTldOverride . getAttributeValue ( "hide" ) , false ) ) continue ; XTag tldxAttribute = getFirstTag ( getCurrentClass ( ) , xm . getName ( ) , NETUI_TLDX_ATTRIBUTE ) ; if ( tldxAttribute != null ) setCurrentMethodTag ( tldxAttribute ) ; } else if ( tldAttribute != null ) setCurrentMethodTag ( tldAttribute ) ; XTag tag = getOverrideClassTag ( xm . getPropertyName ( ) , getCurrentTagName ( ) , getCurrentClass ( ) ) ; if ( tag != null ) setCurrentClassTag ( tag ) ; setCurrentMethod ( xm ) ; } else { } if ( getCurrentMethod ( ) != null ) { if ( getCurrentClassTag ( ) == null || ! TypeConversionUtil . stringToBoolean ( getCurrentClassTag ( ) . getAttributeValue ( "hide" ) , false ) ) { generate ( template ) ; } } setCurrentMethodTag ( null ) ; setCurrentClassTag ( null ) ; setCurrentMethod ( null ) ; } setCurrentClass ( currentClass ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new XDocletException ( e , "An error occurred in the forAllAttributes tag: " + e ) ; } }
@param template              Describe what the parameter does
@param attributes            Describe what the parameter does
@exception XDocletException  Describe the exception
@doc:tag                     type="block"
@doc:tag name="tagName" optional="false" values="netui.tldx:attribute,netui-tld:attribute"
@doc:param name="superclasses" optional="true" values="true,false"
description="If true then traverse superclasses also, otherwise look up the tag in current concrete class only."