当前位置: 首页>>代码示例>>Java>>正文


Java XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE属性代码示例

本文整理汇总了Java中com.sun.org.apache.xerces.internal.impl.dtd.XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE属性的典型用法代码示例。如果您正苦于以下问题:Java XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE属性的具体用法?Java XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE怎么用?Java XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.sun.org.apache.xerces.internal.impl.dtd.XMLContentSpec的用法示例。


在下文中一共展示了XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CMUniOp

public CMUniOp(int type, CMNode childNode)
{
    super(type);

    // Insure that its one of the types we require
    if ((type() != XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE)
    &&  (type() != XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE)
    &&  (type() != XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE))
    {
        throw new RuntimeException("ImplementationMessages.VAL_UST");
    }

    // Store the node and init any data that needs it
    fChild = childNode;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:CMUniOp.java

示例2: isNullable

public boolean isNullable()
{
    //
    //  For debugging purposes, make sure we got rid of all non '*'
    //  repetitions. Otherwise, '*' style nodes are always nullable.
    //
    if (type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE)
        return fChild.isNullable();
    else
        return true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:CMUniOp.java

示例3: postTreeBuildInit

/** Post tree build initialization. */
private int postTreeBuildInit(CMNode nodeCur, int curIndex)
{
    // Set the maximum states on this node
    nodeCur.setMaxStates(fLeafCount);

    // Recurse as required
    if ((nodeCur.type() & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY ||
        (nodeCur.type() & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL ||
        (nodeCur.type() & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY_OTHER) {
        // REVISIT: Don't waste these structures.
        QName qname = new QName(null, null, null, ((CMAny)nodeCur).getURI());
        fLeafList[curIndex] = new CMLeaf(qname, ((CMAny)nodeCur).getPosition());
        fLeafListType[curIndex] = nodeCur.type();
        curIndex++;
    }
    else if ((nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    ||  (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_SEQ))
    {
        curIndex = postTreeBuildInit(((CMBinOp)nodeCur).getLeft(), curIndex);
        curIndex = postTreeBuildInit(((CMBinOp)nodeCur).getRight(), curIndex);
    }
     else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE
         || nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE
         || nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE)
    {
        curIndex = postTreeBuildInit(((CMUniOp)nodeCur).getChild(), curIndex);
    }
     else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_LEAF)
    {
        //
        //  Put this node in the leaf list at the current index if its
        //  a non-epsilon leaf.
        //
         final QName node = ((CMLeaf)nodeCur).getElement();
        if (node.localpart != fEpsilonString) {
            fLeafList[curIndex] = (CMLeaf)nodeCur;
            fLeafListType[curIndex] = XMLContentSpec.CONTENTSPECNODE_LEAF;
            curIndex++;
        }
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_NIICM: type="+nodeCur.type());
    }
    return curIndex;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:47,代码来源:DFAContentModel.java


注:本文中的com.sun.org.apache.xerces.internal.impl.dtd.XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。