public abstract class BinaryPattern extends Pattern
| Modifier and Type | Field and Description |
|---|---|
protected Pattern |
p1 |
protected Pattern |
p2 |
AFTER_HASH_CODE, ATTRIBUTE_CONTEXT, ATTRIBUTE_HASH_CODE, CHOICE_HASH_CODE, DATA_CONTENT_TYPE, DATA_EXCEPT_CONTEXT, DATA_HASH_CODE, ELEMENT_CONTENT_TYPE, ELEMENT_CONTEXT, ELEMENT_HASH_CODE, ELEMENT_REPEAT_CONTEXT, ELEMENT_REPEAT_GROUP_CONTEXT, ELEMENT_REPEAT_INTERLEAVE_CONTEXT, EMPTY_CONTENT_TYPE, EMPTY_HASH_CODE, ERROR_HASH_CODE, GROUP_HASH_CODE, INTERLEAVE_HASH_CODE, LIST_CONTEXT, LIST_HASH_CODE, MIXED_CONTENT_TYPE, NOT_ALLOWED_HASH_CODE, ONE_OR_MORE_HASH_CODE, START_CONTEXT, TEXT_HASH_CODE, VALUE_HASH_CODE| Constructor and Description |
|---|
BinaryPattern(boolean nullable,
int hc,
Pattern p1,
Pattern p2) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
checkRecursion(int depth) |
(package private) void |
checkRestrictions(int context,
DuplicateAttributeDetector dad,
Alphabet alpha) |
private void |
fillChildren(java.lang.Class c,
Pattern p,
java.util.Collection col) |
void |
fillChildren(java.util.Collection col)
Adds all the children of this pattern to the given collection.
|
Pattern[] |
getChildren()
Same as
fillChildren(Collection) but returns an array. |
Pattern |
getOperand1() |
Pattern |
getOperand2() |
(package private) boolean |
samePattern(Pattern other) |
accept, apply, combineHashCode, combineHashCode, containsChoice, contentTypeGroupable, expand, getContentType, isNotAllowed, isNullable, patternHashCodevoid checkRecursion(int depth)
throws org.xml.sax.SAXException
checkRecursion in class Patternorg.xml.sax.SAXExceptionvoid checkRestrictions(int context,
DuplicateAttributeDetector dad,
Alphabet alpha)
throws RestrictionViolationException
checkRestrictions in class PatternRestrictionViolationExceptionboolean samePattern(Pattern other)
samePattern in class Patternpublic final Pattern getOperand1()
public final Pattern getOperand2()
public final void fillChildren(java.util.Collection col)
For example, if this pattern is (A|B|C), it adds A, B, and C to the collection, even though internally it's represented as (A|(B|C)).
public final Pattern[] getChildren()
fillChildren(Collection) but returns an array.private void fillChildren(java.lang.Class c,
Pattern p,
java.util.Collection col)