Package com.thoughtworks.qdox.model

Examples of com.thoughtworks.qdox.model.DocletTag


            throw new EventConventionException("The first parameter of the method " + methodSig
                    + " must be: 'Object source'!");
        }

        //build method model
        DocletTag tag = method.getTagByName("event.severity");
        EventSeverity severity;
        if (tag != null) {
            severity = EventSeverity.valueOf(tag.getValue());
        } else {
            severity = EventSeverity.INFO;
        }
        EventMethodModel methodMeta = new EventMethodModel(
                method.getName(), severity);
View Full Code Here


    }
   
    protected void addExpressions (DocletTag[] tags, String selector, PrintWriter pw, String collectionName, File sourceFile) {
        String fileName = sourceFile != null ? sourceFile.getPath ().replace ('\\', '/') : "<unknown>";
        for (int i = 0; i < tags.length; i++) {
            DocletTag tag = tags[i];
           
            if (isAttribute (tag)) {
                String tagName = tag.getName ();
                String tagValue = tag.getValue ();
                String expression = tagName + " " + tagValue;
                expression = expression.trim ();
               
                // Remove the second @-sign.
                expression = expression.substring (1);
               
                if (selector != null) {
                    if (expression.startsWith (".")) {
                        // We have selector, tag does...
                        String tagSelector = expression.substring (1, expression.indexOf (" "));
                        expression = expression.substring (expression.indexOf (" ")).trim ();
                        if (!selector.equals (tagSelector)) {
                            // ...but they didn't match.
                            continue;
                        }
                    } else {
                        // We have selector, but tag doesn't
                        continue;
                    }
                } else {
                    // No selector, but tag has selector.
                    if (expression.startsWith (".")) {
                        continue;
                    }
                }
               
                pw.println ("        {");
                outputAttributeExpression (pw, expression, fileName, tag.getLineNumber (), "_attr");
                pw.println ("        Object _oattr = _attr; // Need to erase type information");
                pw.println ("        if (_oattr instanceof org.apache.commons.attributes.Sealable) {");
                pw.println ("            ((org.apache.commons.attributes.Sealable) _oattr).seal ();");
                pw.println ("        }");
                pw.println ("        " + collectionName + ".add ( _attr );");
View Full Code Here

        {
            final DocletTag[] tags =
             m_methods[0].getTagsByName( getNS() + Tags.DELIMITER + KEY );
            if( tags.length > 0 )
            {
                DocletTag tag = tags[0];
                return getNamedParameter( tag, SCHEMA_PARAM, null );
            }
        }
        return null;
    }
View Full Code Here

    {
        final JavaMethod[] methods = clazz.getMethods();
        for( int i=0; i<methods.length; i++ )
        {
            JavaMethod method = methods[i];
            final DocletTag tag =
              method.getTagByName( key );
            if( tag != null ) list.add( method );
        }

        if(
View Full Code Here

                    m_methods[j].getTagsByName( getNS()
                    + Tags.DELIMITER + KEY );

            for ( int i = 0; i < tags.length; i++ )
            {
                DocletTag tag = tags[i];
                DependencyDescriptor dep = getDependency( tag );
                final String key = dep.getKey();
                if ( !marked.contains( key ) )
                {
                    deps.add( dep );
View Full Code Here

    * Return the value of the Avalon 'service' tag.
    * @return the service descriptor or null if no service is declared
    */
    public Service getService()
    {
        final DocletTag tag = getJavaClass().getTagByName( getNS() + Tags.DELIMITER + KEY );
        if( null == tag )
        {
            return null;
        }
        final Version version = Version.getVersion( getNamedParameter( tag, VERSION_PARAM, "" ) );
View Full Code Here

    * @return the name of the component type
    * @exception IllegalArgumentException if the name tag does not contain a value
    */
    public Type getType()
    {
        DocletTag tag = getJavaClass().getTagByName( getNS() + Tags.DELIMITER + KEY );
        if( null == tag )
        {
            return null;
        }

View Full Code Here

            String type = null;
            String strategy = null;
            for( int j = 0; j < methods.length; j++ )
            {
                JavaMethod method = methods[j];
                final DocletTag tag = method.getTagByName( getNS() + Tags.DELIMITER + KEY );
                if( tag != null )
                {
                    type =
                      resolveType( getNamedParameter( tag, TYPE_PARAM, CONTEXT_CLASS ) );
                    strategy = getNamedParameter( tag, STRATEGY_PARAM, null );
View Full Code Here

    {
        final Properties properties = new Properties();
        final DocletTag[] tags = getJavaClass().getTagsByName( getNS() + Tags.DELIMITER + KEY  );
        for( int i = 0; i < tags.length; i++ )
        {
            final DocletTag tag = tags[ i ];
            final String key = getNamedParameter( tag, KEY_PARAM  );
            final String value = getNamedParameter( tag, VALUE_PARAM );
            properties.setProperty( key, value );
        }
        return properties;
View Full Code Here

    {
        final Iterator it = m_allClasses.iterator();
        while ( it.hasNext() )
        {
            final JavaClass javaClass = (JavaClass) it.next();
            final DocletTag tag = javaClass.getTagByName( TAG_COMPONENT );

            if ( null != tag )
            {
                final Component comp = new Component( javaClass );
View Full Code Here

TOP

Related Classes of com.thoughtworks.qdox.model.DocletTag

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.