public StructValidator getSimpleValidator() { /* Can we create a simple validator? Yes, if the sub-specs are * all simple (leaves == element tokens with no arity modifier); * this is always true for mixed. */ ContentSpec[] specs = mContentSpecs; int len = specs.length; int i; if (mHasMixed) { i = len; } else { i = 0; for (; i < len; ++i) { if (!specs[i].isLeaf()) { break; } } } if (i == len) { // all leaves, kewl PrefixedNameSet keyset = namesetFromSpecs(mNsAware, specs); return new Validator(mArity, keyset); } // Nah, need a DFA... return null; }
public StructValidator getSimpleValidator() { /* Can we create a simple validator? Yes, if the sub-specs are * all simple (leaves == element tokens with no arity modifier); * this is always true for mixed. */ ContentSpec[] specs = mContentSpecs; int len = specs.length; int i; if (mHasMixed) { i = len; } else { i = 0; for (; i < len; ++i) { if (!specs[i].isLeaf()) { break; } } } if (i == len) { // all leaves, kewl NameKeySet keyset = namesetFromSpecs(mNsAware, specs); return new Validator(mArity, keyset); } // Nah, need a DFA... return null; }
@Override public StructValidator getSimpleValidator() { /* Can we create a simple validator? Yes, if the sub-specs are * all simple (leaves == element tokens with no arity modifier); * this is always true for mixed. */ ContentSpec[] specs = mContentSpecs; int len = specs.length; int i; if (mHasMixed) { i = len; } else { i = 0; for (; i < len; ++i) { if (!specs[i].isLeaf()) { break; } } } if (i == len) { // all leaves, kewl PrefixedNameSet keyset = namesetFromSpecs(mNsAware, specs); return new Validator(mArity, keyset); } // Nah, need a DFA... return null; }
@Override public StructValidator getSimpleValidator() { /* Can we create a simple validator? Yes, if the sub-specs are * all simple (leaves == element tokens with no arity modifier); * this is always true for mixed. */ ContentSpec[] specs = mContentSpecs; int len = specs.length; int i; if (mHasMixed) { i = len; } else { i = 0; for (; i < len; ++i) { if (!specs[i].isLeaf()) { break; } } } if (i == len) { // all leaves, kewl PrefixedNameSet keyset = namesetFromSpecs(mNsAware, specs); return new Validator(mArity, keyset); } // Nah, need a DFA... return null; }
public StructValidator getSimpleValidator() { /* Can we create a simple validator? Yes, if the sub-specs are * all simple (leaves == element tokens with no arity modifier); * this is always true for mixed. */ ContentSpec[] specs = mContentSpecs; int len = specs.length; int i; if (mHasMixed) { i = len; } else { i = 0; for (; i < len; ++i) { if (!specs[i].isLeaf()) { break; } } } if (i == len) { // all leaves, kewl NameKeySet keyset = namesetFromSpecs(mNsAware, specs); return new Validator(mArity, keyset); } // Nah, need a DFA... return null; }
public StructValidator getSimpleValidator() { /* Can we create a simple validator? Yes, if the sub-specs are * all simple (leaves == element tokens with no arity modifier); * this is always true for mixed. */ ContentSpec[] specs = mContentSpecs; int len = specs.length; int i; if (mHasMixed) { i = len; } else { i = 0; for (; i < len; ++i) { if (!specs[i].isLeaf()) { break; } } } if (i == len) { // all leaves, kewl PrefixedNameSet keyset = namesetFromSpecs(mNsAware, specs); return new Validator(mArity, keyset); } // Nah, need a DFA... return null; }
public StructValidator getSimpleValidator() { /* Can we create a simple validator? Yes, if the sub-specs are * all simple (leaves == element tokens with no arity modifier); * this is always true for mixed. */ ContentSpec[] specs = mContentSpecs; int len = specs.length; int i; if (mHasMixed) { i = len; } else { i = 0; for (; i < len; ++i) { if (!specs[i].isLeaf()) { break; } } } if (i == len) { // all leaves, kewl NameKeySet keyset = namesetFromSpecs(mNsAware, specs); return new Validator(mArity, keyset); } // Nah, need a DFA... return null; }
@Override public StructValidator getSimpleValidator() { /* Can we create a simple validator? Yes, if the sub-specs are * all simple (leaves == element tokens with no arity modifier); * this is always true for mixed. */ ContentSpec[] specs = mContentSpecs; int len = specs.length; int i; if (mHasMixed) { i = len; } else { i = 0; for (; i < len; ++i) { if (!specs[i].isLeaf()) { break; } } } if (i == len) { // all leaves, kewl PrefixedNameSet keyset = namesetFromSpecs(mNsAware, specs); return new Validator(mArity, keyset); } // Nah, need a DFA... return null; }