Package xjavadoc

Examples of xjavadoc.XClass


        // sort alphabetically
        Iterator i = sort(classes.iterator());
        while(i.hasNext())
        {
            XClass currentClass = (XClass)i.next();

            if(packageName != null && !currentClass.getQualifiedName().startsWith(packageName))
                continue;

             //System.out.println("currentClass=" + currentClass.getQualifiedName());
             //System.out.println(" packageName: " + packageName);
             //System.out.println(" startsWith: " + currentClass.getQualifiedName().startsWith(packageName));

            setCurrentClass(currentClass);

            if (DocletSupport.isDocletGenerated(getCurrentClass()) || (getCurrentClass().isAbstract() && acceptAbstractClasses == false))
            {
                logger.debug("isDocletGenerated or isAbstract");
                continue;
            }

            if (typeName != null)
            {
                if (TypeTagsHandler.isOfType(currentClass, typeName, extent))
                {
                    if(DEBUG) {
                        logger.debug("isOfType true, generate().");
                        logger.debug("handling type: "  + currentClass.getQualifiedName());
                    }

                    generate(template);
                }
                else if(DEBUG) logger.debug("isOfType false, generate().");
View Full Code Here


            logger.debug("Handling tagName: " + tagName);

        setCurrentTagName(tagName);

        try {
            XClass currentClass = getCurrentClass();

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

            Collection members = currentClass.getMethods(true);

            List sortedMembers = new ArrayList(members);
            Collections.sort(sortedMembers, memberComparator);
            members = sortedMembers;
View Full Code Here

       
        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!!!");
View Full Code Here

    {
        List sorted = new ArrayList();
       
        while(iterator.hasNext())
        {
            XClass clazz = (XClass)iterator.next();
           
            sorted.add(clazz);
        }

        java.util.Collections.sort(sorted, new java.util.Comparator()
View Full Code Here

public class XDocletUtils
{
    public static XClass getOutermostClass( XProgramElement element )
    {
        XClass containingClass;
        while ( ( containingClass = element.getContainingClass() ) != null )
        {
            element = containingClass;
        }
       
View Full Code Here

   
    private static XClass getXClass( String typeName, XJavaDoc xJavaDoc )
    {
        assert ! typeName.endsWith( "[]" ) : "array type not allowed here: " + typeName;
       
        XClass type = xJavaDoc.getXClass( typeName );
       
        //
        // This may be an inner class, which needs a '$' instead of a '.'.
        //
        if ( isUnknownClass( type ) )
View Full Code Here

        }
       
        if ( currentClass == null ) currentClass = NetuiSubTask.get().getCurrentSourceClass();
        XJavaDoc xJavaDoc = currentClass.getXJavaDoc();
       
        XClass originalResolvedType = getXClass( typeName, xJavaDoc );
        XClass attemptedResolvedType = originalResolvedType;
       
        if ( isUnknownClass( attemptedResolvedType ) )
        {
            attemptedResolvedType = getXClass( "java.lang." + typeName, xJavaDoc );
        }
           
        if ( isUnknownClass( attemptedResolvedType ) )
        {
            // See if it was an imported class.
            List importedClasses = currentClass.getImportedClasses();
            String dotPrepended = '.' + typeName;
                 
            for ( Iterator i = importedClasses.iterator(); i.hasNext(); )
            {
                XClass importedClass = ( XClass ) i.next();
                if ( importedClass.getQualifiedName().endsWith( dotPrepended ) )
                {
                    attemptedResolvedType = getXClass( importedClass.getQualifiedName(), xJavaDoc );
                    break;
                }
            }
        }
             
        if ( isUnknownClass( attemptedResolvedType ) )
        {
            // See if it was in an imported package.
            List importedPackages = currentClass.getImportedPackages();
            String dotPrepended = '.' + typeName;
                 
            for ( Iterator i = importedPackages.iterator(); i.hasNext(); )
            {
                XPackage importedPackage = ( XPackage ) i.next();
                XClass implicitImportedClass = getXClass( importedPackage.getName() + dotPrepended, xJavaDoc );
                if ( ! isUnknownClass( implicitImportedClass ) )
                {
                    attemptedResolvedType = implicitImportedClass;
                    break;
                }
View Full Code Here

        super( delegate );
    }

    public TypeInstance getType()
    {
        XClass fieldType = getDelegateXField().getType();
        int dimension = getDelegateXField().getDimension();
        return WrapperFactory.get().getTypeInstance( fieldType, dimension );
    }
View Full Code Here

        }

        // first search via XDoclet
        ArrayList queue      = new ArrayList();
        boolean   canSpecify = false;
        XClass    curType;

        queue.add(type);
        while (!queue.isEmpty())
        {
            curType = (XClass)queue.get(0);
            queue.remove(0);
            if (qualifiedBaseType.equals(curType.getQualifiedName()))
            {
                return true;
            }
            if (curType.getInterfaces() != null)
            {
                for (Iterator it = curType.getInterfaces().iterator(); it.hasNext(); )
                {
                    queue.add(it.next());
                }
            }
            if (!curType.isInterface())
            {
                if (curType.getSuperclass() != null)
                {
                    queue.add(curType.getSuperclass());
                }
            }
        }

        // if not found, we try via actual classes
View Full Code Here

        int extent = TypeTagsHandler.extractExtentType(attributes.getProperty("extent"));

        SortedSet constructors = new TreeSet();

        for (Iterator i = getAllClasses().iterator(); i.hasNext(); ) {
            XClass clazz = (XClass) i.next();

            if (typeName == null || TypeTagsHandler.isOfType(clazz, typeName, extent)) {
                Collection classConstructors = clazz.getConstructors();

                constructors.addAll(classConstructors);

            }
        }
View Full Code Here

TOP

Related Classes of xjavadoc.XClass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.