Package com.sun.jersey.server.wadl.generators.resourcedoc.model

Examples of com.sun.jersey.server.wadl.generators.resourcedoc.model.ClassDocType


{
    @Test
    public void wadlIsGeneratedWithUnknownCustomParameterAnnotation() throws JAXBException
    {
        /* Set up a ClassDocType that has something for a custom-annotated parameter */
        ClassDocType cdt = new ClassDocType();
        cdt.setClassName(TestResource.class.getName());

        MethodDocType mdt = new MethodDocType();
        mdt.setMethodName("method");
        cdt.getMethodDocs().add(mdt);

        ParamDocType pdt = new ParamDocType("x", "comment about x");
        mdt.getParamDocs().add(pdt);

        AnnotationDocType adt = new AnnotationDocType();
View Full Code Here


        }
        return null;
    }

    public MethodDocType getMethodDoc( Class<?> resourceClass, Method method ) {
        final ClassDocType classDoc = getClassDoc( resourceClass );
        if ( classDoc != null ) {
            for ( MethodDocType methodDocType : classDoc.getMethodDocs() ) {
                if (method != null && method.getName().equals(methodDocType.getMethodName())) {
                    return methodDocType;
                }
            }
        }
View Full Code Here

     * @return the enhanced {@link Resource}
     * @see com.sun.jersey.server.wadl.WadlGenerator#createResource(com.sun.jersey.api.model.AbstractResource, java.lang.String)
     */
    public Resource createResource( AbstractResource r, String path ) {
        final Resource result = _delegate.createResource( r, path );
        final ClassDocType classDoc = _resourceDoc.getClassDoc( r.getResourceClass() );
        if ( classDoc != null && !isEmpty( classDoc.getCommentText() ) ) {
            final Doc doc = new Doc();
            doc.getContent().add( classDoc.getCommentText() );
            result.getDoc().add( doc );
        }
        return result;
    }
View Full Code Here

     * @return
     * @see com.sun.jersey.server.impl.wadl.WadlGenerator#createResource(com.sun.jersey.api.model.AbstractResource, java.lang.String)
     */
    public Resource createResource( AbstractResource r, String path ) {
        final Resource result = _delegate.createResource( r, path );
        final ClassDocType classDoc = _resourceDoc.getClassDoc( r.getResourceClass() );
        if ( classDoc != null && !isEmpty( classDoc.getCommentText() ) ) {
            final Doc doc = new Doc();
            doc.getContent().add( classDoc.getCommentText() );
            result.getDoc().add( doc );
        }
        return result;
    }
View Full Code Here

        }
        return null;
    }

    public MethodDocType getMethodDoc( Class<?> resourceClass, Method method ) {
        final ClassDocType classDoc = getClassDoc( resourceClass );
        if ( classDoc != null ) {
            for ( MethodDocType methodDocType : classDoc.getMethodDocs() ) {
                if ( method.getName().equals( methodDocType.getMethodName() ) ) {
                    return methodDocType;
                }
            }
        }
View Full Code Here

     * @return the enhanced {@link Resource}
     * @see com.sun.jersey.server.wadl.WadlGenerator#createResource(com.sun.jersey.api.model.AbstractResource, java.lang.String)
     */
    public Resource createResource( AbstractResource r, String path ) {
        final Resource result = _delegate.createResource( r, path );
        final ClassDocType classDoc = _resourceDoc.getClassDoc( r.getResourceClass() );
        if ( classDoc != null && !isEmpty( classDoc.getCommentText() ) ) {
            final Doc doc = new Doc();
            doc.getContent().add( classDoc.getCommentText() );
            result.getDoc().add( doc );
        }
        return result;
    }
View Full Code Here

        }
        return null;
    }

    public MethodDocType getMethodDoc( Class<?> resourceClass, Method method ) {
        final ClassDocType classDoc = getClassDoc( resourceClass );
        if ( classDoc != null ) {
            for ( MethodDocType methodDocType : classDoc.getMethodDocs() ) {
                if ( method.getName().equals( methodDocType.getMethodName() ) ) {
                    return methodDocType;
                }
            }
        }
View Full Code Here

     * @return the enhanced {@link Resource}
     * @see com.sun.jersey.server.wadl.WadlGenerator#createResource(com.sun.jersey.api.model.AbstractResource, java.lang.String)
     */
    public Resource createResource( AbstractResource r, String path ) {
        final Resource result = _delegate.createResource( r, path );
        final ClassDocType classDoc = _resourceDoc.getClassDoc( r.getResourceClass() );
        if ( classDoc != null && !isEmpty( classDoc.getCommentText() ) ) {
            final Doc doc = new Doc();
            doc.getContent().add( classDoc.getCommentText() );
            result.getDoc().add( doc );
        }
        return result;
    }
View Full Code Here

        }
        return null;
    }

    public MethodDocType getMethodDoc( Class<?> resourceClass, Method method ) {
        final ClassDocType classDoc = getClassDoc( resourceClass );
        if ( classDoc != null ) {
            for ( MethodDocType methodDocType : classDoc.getMethodDocs() ) {
                if ( method.getName().equals( methodDocType.getMethodName() ) ) {
                    return methodDocType;
                }
            }
        }
View Full Code Here

            final ResourceDocType result = new ResourceDocType();
   
            final ClassDoc[] classes = root.classes();
            for ( ClassDoc classDoc : classes ) {
                LOG.fine( "Writing class " + classDoc.qualifiedTypeName() );
                final ClassDocType classDocType = new ClassDocType();
                classDocType.setClassName( classDoc.qualifiedTypeName() );
                classDocType.setCommentText( classDoc.commentText() );
                docProcessor.processClassDoc( classDoc, classDocType );
               
                for ( MethodDoc methodDoc : classDoc.methods() ) {
                   
                    final MethodDocType methodDocType = new MethodDocType();
                    methodDocType.setMethodName( methodDoc.name() );
                    methodDocType.setCommentText( methodDoc.commentText() );
                    docProcessor.processMethodDoc( methodDoc, methodDocType );
                   
                    addParamDocs( methodDoc, methodDocType, docProcessor );
                   
                    addRequestRepresentationDoc( methodDoc, methodDocType );
                   
                    addResponseDoc( methodDoc, methodDocType );
                   
                    classDocType.getMethodDocs().add( methodDocType );
                }
               
                result.getDocs().add( classDocType );
            }
   
View Full Code Here

TOP

Related Classes of com.sun.jersey.server.wadl.generators.resourcedoc.model.ClassDocType

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.