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

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


        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();
        adt.setAnnotationTypeName(CustomParam.class.getName());
        adt.getAttributeDocs().add(new NamedValueType("value", "x"));

        pdt.getAnnotationDocs().add(adt);

        ResourceDocType rdt = new ResourceDocType();
        rdt.getDocs().add(cdt);

View Full Code Here


     */
    public Param createParam(AbstractResource r,
                             AbstractMethod m, Parameter p) {
        final Param result = _delegate.createParam(r, m, p);
        if (result != null) {
            final ParamDocType paramDoc = _resourceDoc.getParamDoc( r.getResourceClass(), (m == null ? null : m.getMethod()), p );
            if(paramDoc != null && !isEmpty( paramDoc.getCommentText())) {
                final Doc doc = new Doc();
                doc.getContent().add( paramDoc.getCommentText() );
                result.getDoc().add( doc );
            }
        }
        return result;
    }
View Full Code Here

     * @see com.sun.jersey.server.impl.wadl.WadlGenerator#createParam(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractMethod, com.sun.jersey.api.model.Parameter)
     */
    public Param createParam( AbstractResource r,
            AbstractMethod m, Parameter p ) {
        final Param result = _delegate.createParam( r, m, p );
        final ParamDocType paramDoc = _resourceDoc.getParamDoc( r.getResourceClass(), m.getMethod(), p );
        if ( paramDoc != null && !isEmpty( paramDoc.getCommentText() ) ) {
            final Doc doc = new Doc();
            doc.getContent().add( paramDoc.getCommentText() );
            result.getDoc().add( doc );
        }
        return result;
    }
View Full Code Here

     * @see com.sun.jersey.server.wadl.WadlGenerator#createParam(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractMethod, com.sun.jersey.api.model.Parameter)
     */
    public Param createParam( AbstractResource r,
            AbstractMethod m, Parameter p ) {
        final Param result = _delegate.createParam( r, m, p );
        final ParamDocType paramDoc = _resourceDoc.getParamDoc( r.getResourceClass(), (m == null ? null : m.getMethod()), p );
        if ( paramDoc != null && !isEmpty( paramDoc.getCommentText() ) ) {
            final Doc doc = new Doc();
            doc.getContent().add( paramDoc.getCommentText() );
            result.getDoc().add( doc );
        }
        return result;
    }
View Full Code Here

     * @see com.sun.jersey.server.wadl.WadlGenerator#createParam(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractMethod, com.sun.jersey.api.model.Parameter)
     */
    public Param createParam( AbstractResource r,
            AbstractMethod m, Parameter p ) {
        final Param result = _delegate.createParam( r, m, p );
        final ParamDocType paramDoc = _resourceDoc.getParamDoc( r.getResourceClass(), m.getMethod(), p );
        if ( paramDoc != null && !isEmpty( paramDoc.getCommentText() ) ) {
            final Doc doc = new Doc();
            doc.getContent().add( paramDoc.getCommentText() );
            result.getDoc().add( doc );
        }
        return result;
    }
View Full Code Here

                 * order. If the param tags are mixed up, the comments for parameters
                 * will be wrong.
                 */
                final ParamTag paramTag = paramTags[i];
               
                final ParamDocType paramDocType = new ParamDocType();
                paramDocType.setParamName( paramTag.parameterName() );
                paramDocType.setCommentText( paramTag.parameterComment() );
                docProcessor.processParamTag( paramTag, parameter, paramDocType );
               
                AnnotationDesc[] annotations = parameter.annotations();
                if ( annotations != null  ) {
                    for ( AnnotationDesc annotationDesc : annotations ) {
                        final AnnotationDocType annotationDocType = new AnnotationDocType();
                        final String typeName = annotationDesc.annotationType().qualifiedName();
                        annotationDocType.setAnnotationTypeName( typeName );
                        for ( ElementValuePair elementValuePair : annotationDesc.elementValues() ) {
                            final NamedValueType namedValueType = new NamedValueType();
                            namedValueType.setName( elementValuePair.element().name() );
                            namedValueType.setValue( elementValuePair.value().value().toString() );
                            annotationDocType.getAttributeDocs().add( namedValueType );
                        }
                        paramDocType.getAnnotationDocs().add( annotationDocType );
                    }
                }
               
                methodDocType.getParamDocs().add( paramDocType );
               
View Full Code Here

                 * order. If the param tags are mixed up, the comments for parameters
                 * will be wrong.
                 */
                final ParamTag paramTag = paramTags[i];
               
                final ParamDocType paramDocType = new ParamDocType();
                paramDocType.setParamName( paramTag.parameterName() );
                paramDocType.setCommentText( paramTag.parameterComment() );
                docProcessor.processParamTag( paramTag, parameter, paramDocType );
               
                AnnotationDesc[] annotations = parameter.annotations();
                if ( annotations != null  ) {
                    for ( AnnotationDesc annotationDesc : annotations ) {
                        final AnnotationDocType annotationDocType = new AnnotationDocType();
                        final String typeName = annotationDesc.annotationType().qualifiedName();
                        annotationDocType.setAnnotationTypeName( typeName );
                        for ( ElementValuePair elementValuePair : annotationDesc.elementValues() ) {
                            final NamedValueType namedValueType = new NamedValueType();
                            namedValueType.setName( elementValuePair.element().name() );
                            namedValueType.setValue( elementValuePair.value().value().toString() );
                            annotationDocType.getAttributeDocs().add( namedValueType );
                        }
                        paramDocType.getAnnotationDocs().add( annotationDocType );
                    }
                }
               
                methodDocType.getParamDocs().add( paramDocType );
               
View Full Code Here

     * @see com.sun.jersey.server.impl.wadl.WadlGenerator#createParam(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractMethod, com.sun.jersey.api.model.Parameter)
     */
    public Param createParam( AbstractResource r,
            AbstractMethod m, Parameter p ) {
        final Param result = _delegate.createParam( r, m, p );
        final ParamDocType paramDoc = _resourceDoc.getParamDoc( r.getResourceClass(), m.getMethod(), p );
        if ( paramDoc != null && !isEmpty( paramDoc.getCommentText() ) ) {
            final Doc doc = new Doc();
            doc.getContent().add( paramDoc.getCommentText() );
            result.getDoc().add( doc );
        }
        return result;
    }
View Full Code Here

TOP

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

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.