|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.msv.reader.trex.ng.RestrictionChecker.DuplicateNameChecker
protected abstract class RestrictionChecker.DuplicateNameChecker
Field Summary | |
---|---|
protected int |
areaLen
|
protected int[] |
areas
areas. |
protected NameClassAndExpression[] |
exps
ElementExps will be added into this array. |
protected int |
expsLen
Number of items in the atts array. |
Constructor Summary | |
---|---|
protected |
RestrictionChecker.DuplicateNameChecker()
|
Method Summary | |
---|---|
void |
add(NameClassAndExpression exp)
Adds newly found element or attribute. |
protected abstract void |
check(NameClassAndExpression exp)
tests a given exp against existing expressions (which are stored in the exps field.) |
protected void |
check(NameClassAndExpression newExp,
NameClassAndExpression oldExp)
Tests two name classes to see if they collide. |
void |
endLeftBranch(int start)
|
void |
endRightBranch()
|
protected abstract String |
getErrorMessage()
Gets the error message resource name. |
int |
start()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected NameClassAndExpression[] exps
protected int expsLen
protected int[] areas
An area is a range of index designated by the start and end. Areas are stored as:
{ start, end, start, end, ... }
The start method gives the index. The endLeftBranch method creates an area by using the start index given by the start method. The endRightBranch method will remove the area.
When testing duplicate attributes, areas are created by ChoiceExp and used to exclude test candidates (as two attributes can share the same name if they are in different branches of choice.)
When testing duplicate elements, areas are created by InterleaveExp and used to include test candidates (as two elements cannot share the same name if they are in different branches of interleave.)
protected int areaLen
Constructor Detail |
---|
protected RestrictionChecker.DuplicateNameChecker()
Method Detail |
---|
public void add(NameClassAndExpression exp)
protected abstract void check(NameClassAndExpression exp)
public int start()
public void endLeftBranch(int start)
public void endRightBranch()
protected void check(NameClassAndExpression newExp, NameClassAndExpression oldExp)
protected abstract String getErrorMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |