Logo Search packages:      
Sourcecode: icedtea-web version File versions  Download package

Object net::sourceforge::jnlp::Parser::getLauncher ( Node  parent  )  throws ParseException [inline]

Returns the launch descriptor element, either AppletDesc, ApplicationDesc, ComponentDesc, or InstallerDesc.

Parameters:
parent the parent node
Exceptions:
ParseException if the JNLP file is invalid

Definition at line 608 of file Parser.java.

References getApplet(), getApplication(), getChildNodes(), getComponent(), net::sourceforge::jnlp::Node::getFirstChild(), getInstaller(), net::sourceforge::jnlp::Node::getNextSibling(), and net::sourceforge::jnlp::Node::getNodeName().

Referenced by net::sourceforge::jnlp::JNLPFile::parse().

                                                                 {
        // check for other than one application type
        if (1 != getChildNodes(parent, "applet-desc").length
            + getChildNodes(parent, "application-desc").length
            + getChildNodes(parent, "component-desc").length
            + getChildNodes(parent, "installer-desc").length)
            throw new ParseException(R("PTwoDescriptors"));

        Node child = parent.getFirstChild();
        while (child != null) {
            String name = child.getNodeName();

            if ("applet-desc".equals(name))
                return getApplet(child);
            if ("application-desc".equals(name))
                return getApplication(child);
            if ("component-desc".equals(name))
                return getComponent(child);
            if ("installer-desc".equals(name))
                return getInstaller(child);

            child = child.getNextSibling();
        }

        // not reached
        return null;
    }


Generated by  Doxygen 1.6.0   Back to index