Examples of XTag


Examples of xjavadoc.XTag

    protected void generateForClass(XClass clazz) throws XDocletException
    {
        Collection formTags = clazz.getDoc().getTags("struts.form");

        for (Iterator i = formTags.iterator(); i.hasNext(); ) {
            XTag tag = (XTag) i.next();

            setCurrentFormTag(tag);
            super.generateForClass(clazz);
        }
    }
View Full Code Here

Examples of xjavadoc.XTag

                    if (paramName == null) {
                        return true;
                    }
                    else {
                        for (Iterator it2 = tags.iterator(); it2.hasNext(); ) {
                            XTag tag = (XTag) it2.next();
                            String value = tag.getAttributeValue(paramName);

                            if (value != null && (paramValue == null || paramValue.equals(value))) {
                                return true;
                            }
                        }
View Full Code Here

Examples of xjavadoc.XTag

     * @return                      The ActionFormClassName value
     * @exception XDocletException  Describe the exception
     */
    public static String getActionFormClassName(XClass clazz) throws XDocletException
    {
        XTag currentTag = ((ActionFormSubTask) DocletContext.getInstance().getSubTaskBy(DocletTask.getSubTaskName(ActionFormSubTask.class))).getCurrentFormTag();

        // check if there is a name parameter
        String name = currentTag.getAttributeValue("name");

        if (name == null) {
            return clazz.getTransformedName() + "Form";
        }
        else {
View Full Code Here

Examples of xjavadoc.XTag

     * @exception XDocletException  Description of Exception
     * @doc.tag                     type="content"
     */
    public String actionFormName() throws XDocletException
    {
        XTag currentTag = ((ActionFormSubTask) getDocletContext().getSubTaskBy(DocletTask.getSubTaskName(ActionFormSubTask.class))).getCurrentFormTag();
        String formName = currentTag.getAttributeValue("name");

        if (formName == null || formName.trim().length() == 0) {
            return Introspector.decapitalize(getCurrentClass().getTransformedName() + "Form");
        }
        else {
View Full Code Here

Examples of xjavadoc.XTag

     * @exception XDocletException  Description of Exception
     */
    protected boolean useMethodInForm(XMethod method) throws XDocletException
    {
        // check for include-all
        XTag currentTag = ((ActionFormSubTask) getDocletContext().getSubTaskBy(DocletTask.getSubTaskName(ActionFormSubTask.class))).getCurrentFormTag();
        String value = currentTag.getAttributeValue("include-all");

        // by default, include all is false
        if (value != null && value.equals("true")) {
            return true;
        }

        // check for explicit inclusion
        Collection mTags = method.getDoc().getTags("struts:form-field");

        // if there's a name on the form, then user must specify a form-name attribute
        // on the method.  This is so multiple forms can be generated from the same POJO.
        String fname = currentTag.getAttributeValue("name");

        if (fname == null && !mTags.isEmpty()) {
            return true;
        }
        else {
            for (Iterator i = mTags.iterator(); i.hasNext(); ) {
                XTag mTag = (XTag) i.next();
                String pname = mTag.getAttributeValue("form-name");

                if (pname != null && fname != null && fname.equals(pname)) {
                    return true;
                }
            }
View Full Code Here

Examples of xjavadoc.XTag

        if (!InterfaceTagsHandler.isLocalEjb(getCurrentClass())) {
            log.debug("Reject file " + clazz.getQualifiedName() + " because of different view-type");
            return false;
        }

        XTag interfaceTag = getCurrentClass().getDoc().getTag("ejb:interface");

        if (interfaceTag == null) {
            return true;
        }

        String generate = interfaceTag.getAttributeValue("generate");

        if ((generate != null) && (generate.indexOf("local") == -1)) {
            log.debug("Skip remote interface for " + clazz.getQualifiedName() + " because of generate=" + generate + " flag.");
            return false;
        }
View Full Code Here

Examples of xjavadoc.XTag

        XMethod method = getCurrentMethod();
        Collection tags = method.getDoc().getTags("spring.validator");
        StringBuffer buffer = new StringBuffer();

        for (Iterator iterator = tags.iterator(); iterator.hasNext(); ) {
            XTag tag = (XTag) iterator.next();

            buffer.append(tag.getAttributeValue("type"));
            if (iterator.hasNext()) {
                buffer.append(",");
            }
        }
        return buffer.toString();
View Full Code Here

Examples of xjavadoc.XTag

        // Collect all general args
        Collection argTags = method.getDoc().getTags("spring.validator-args");

        for (Iterator argsIterator = argTags.iterator(); argsIterator.hasNext(); ) {
            XTag tag = (XTag) argsIterator.next();
            Collection attributeNames = tag.getAttributeNames();

            for (Iterator attributesIterator = attributeNames.iterator(); attributesIterator.hasNext(); ) {
                String name = (String) attributesIterator.next();

                if (name.startsWith("arg")) {
                    args.put(name, tag.getAttributeValue(name));
                }
            }
        }

        // Collect all type-specific args
        Collection argTypeTags = method.getDoc().getTags("spring.validator");

        for (Iterator typeTagsIterator = argTypeTags.iterator(); typeTagsIterator.hasNext(); ) {
            XTag tag = (XTag) typeTagsIterator.next();
            Collection attributeNames = tag.getAttributeNames();
            String type = tag.getAttributeValue("type");

            for (Iterator attributesIterator = attributeNames.iterator(); attributesIterator.hasNext(); ) {
                String name = (String) attributesIterator.next();

                if (name.startsWith("arg")) {
                    args.put(name + "_" + type, tag.getAttributeValue(name));
                }
            }
        }
    }
View Full Code Here

Examples of xjavadoc.XTag

        }

        String nameParam = attributes.getProperty("nameParam", "res-ref-name");
        String resRefName = currentTag.getAttributeValue(nameParam);

        XTag wsResRef = null;

        if (currentMember == null) {
            // class level
            Collection tags = getCurrentClass().getDoc().getTags("websphere:resource-ref", true);

            for (Iterator i = tags.iterator(); i.hasNext(); ) {
                XTag tag = (XTag) i.next();
                String attr = tag.getAttributeValue("res-ref-name");

                if (resRefName != null && !resRefName.equals(attr)) {
                    continue;
                }

                wsResRef = tag;
            }
        }
        else {
            // field- or method-level
            wsResRef = currentMember.getDoc().getTag("websphere:resource-ref", true);
        }

        if (wsResRef != null) {
            XTag oldCurrentTag = currentTag;

            currentTag = wsResRef;
            generate(template);
            currentTag = oldCurrentTag;
        }
View Full Code Here

Examples of xjavadoc.XTag

     */
    public String required()
    {
        // default value
        String result = null;
        XTag required = getCurrentMethod().getDoc().getTag("ant.required");

        if (required != null) {
            result = required.getValue().trim();
            if (result.equals("")) {
                result = "Yes.";
            }
        }
        else {
            XTag not_required = getCurrentMethod().getDoc().getTag("ant.not-required");

            if (not_required != null) {
                result = not_required.getValue().trim();
                if (result.equals("")) {
                    result = "No.";
                }
            }
            else
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.