Package xjavadoc

Examples of xjavadoc.XClass


                String sqlName = getSqlNames(tags.iterator());

                extensions.add(new VendorExtension(getVendorName(), "sql-owner-name", sqlName));

                String embeddedClassName = doc.getTagAttributeValue("jdo.field", "element-type");
                XClass embeddedClass = getXJavaDoc().getXClass(embeddedClassName);
                String relatedCollection = doc.getTagAttributeValue(SQL_RELATION_TAG, RELATED_FIELD_ATTR);
                XDoc relatedDoc = embeddedClass.getField(relatedCollection).getDoc();
                Collection targetTags = relatedDoc.getTags(SQL_FIELD_TAG);
                String targetSqlName = getSqlNames(targetTags.iterator());

                extensions.add(new VendorExtension(getVendorName(), "sql-value-name", targetSqlName));
            }
View Full Code Here


                    extensions.add(new VendorExtension(getVendorName(), "inverse", relatedField));
                }
                else if (STYLE_RELATION_TABLE_VALUE.equals(style)) {
                    String embeddedClassName = doc.getTagAttributeValue("jdo.field", "element-type");
                    XClass embeddedClass = getXJavaDoc().getXClass(embeddedClassName);
                    String relatedCollection = doc.getTagAttributeValue(SQL_RELATION_TAG, RELATED_FIELD_ATTR);
                    XDoc relatedDoc = embeddedClass.getField(relatedCollection).getDoc();

                    extensions.add(new VendorExtension(getVendorName(), "inverse", relatedCollection));

                    String relationTable = doc.getTagAttributeValue(SQL_RELATION_TAG, TABLE_NAME_ATTR);
View Full Code Here

        return fileName;
    }

    public static String serviceEndpoint(Properties properties) throws XDocletException
    {
        XClass clazz = getCurrentClass();

        return serviceEndpoint(clazz);
    }
View Full Code Here

         throws XDocletException
    {
        Collection classes = getXJavaDoc().getSourceClasses();

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

            setCurrentClass(clazz);

            if (DocletSupport.isDocletGenerated(getCurrentClass())) {
                continue;
View Full Code Here

     * @exception XDocletException
     * @doc.tag                     type="content"
     */
    public String serviceEndpoint(Properties props) throws XDocletException
    {
        XClass clazz = getCurrentClass();
        String pkg = PackageTagsHandler.getPackageNameFor(clazz.getContainingPackage(), true);
        XTag ejbTag = null;
        String spec = null;

        if (clazz.getDoc().hasTag("ejb.bean")) {
            ejbTag = clazz.getDoc().getTag("ejb.interface");
            if (ejbTag != null) {
                spec = ejbTag.getAttributeValue("service-endpoint-class");
            }
            // if we haven't explicitly defined a service interface name, try to build the default name.
            if (spec == null || "".equals(spec)) {
                spec = pkg + "." + clazz.getName();
                if (spec.endsWith("Bean"))
                    spec = spec.substring(0, spec.length() - 4);
            }
        }
        else {

            ejbTag = clazz.getDoc().getTag("web.servlet");
            if (ejbTag != null) {
                spec = ejbTag.getAttributeValue("service-endpoint-class");
            }
            if (spec == null || "".equals(spec)) {
                spec = pkg + "." + clazz.getName();
                spec += "Service";
            }
        }

        return spec;
View Full Code Here

    {
        Log log = LogUtil.getLog(CastorTagsHandler.class, "forAllClasses");
        Collection classes = getOrderedClasses();

        for (Iterator i = classes.iterator(); i.hasNext(); ) {
            XClass currentClass = (XClass)i.next();

            setCurrentClass(currentClass);
            log.debug("currentClass=" + currentClass);
            generate(template);
        }
View Full Code Here

        Log log = LogUtil.getLog(CastorTagsHandler.class, "gatherClasses");

        boolean addedAll = true;

        for (Iterator i = (getXJavaDoc().getSourceClasses()).iterator(); i.hasNext(); ) {
            XClass currentClass = (XClass)i.next();
            String depends = getTagValue(FOR_CLASS, currentClass.getDoc(), "depends", "", "", null, false, false);

            if (depends == null) {
                orderedClasses.add(currentClass);
                log.debug("Adding " + currentClass);
            }
View Full Code Here

    private boolean checkOrderedClasses(List orderedClasses, String depends, XClass currentClass)
    {
        Log log = LogUtil.getLog(CastorTagsHandler.class, "checkOrderedClasses");

        for (Iterator iterator = orderedClasses.iterator(); iterator.hasNext(); ) {
            XClass xClass = (XClass) iterator.next();

            if (xClass.getName().equals(depends)) {
                orderedClasses.add(currentClass);
                log.debug("Found " + depends);
                return true;
            }
        }
View Full Code Here

     * @doc.tag                     type="content"
     */
    public String serviceEndpointLink(Properties props)
         throws XDocletException
    {
        XClass clazz = getCurrentClass();
        XTag ejbTag = clazz.getDoc().getTag("ejb.bean");

        if (ejbTag != null) {
            return "<ejb-link>" + ejbTag.getAttributeValue("name") + "</ejb-link>";
        }
        ejbTag = clazz.getDoc().getTag("web.servlet");
        if (ejbTag != null) {
            return "<servlet-link>"
                + ejbTag.getAttributeValue("name")
                + "</servlet-link>";
        }
View Full Code Here

     * @doc.tag                  type="block"
     */
    public void forAllHandlers(String template, Properties attributes)
         throws XDocletException
    {
        XClass clazz = getCurrentClass();
        Iterator allTags = clazz.getDoc().getTags(HANDLER).iterator();

        while (allTags.hasNext()) {
            currentHandler = (XTag) allTags.next();
            generate(template);
        }
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.