XSCMLeafpublic class XSCMLeaf extends CMNode
Fields Summary |
---|
private Object | fLeafThis is the leaf: element decl or wildcard decl. | private int | fParticleIdIdentify the particle: for UPA checking | private int | fPositionPart of the algorithm to convert a regex directly to a DFA
numbers each leaf sequentially. If its -1, that means its an
epsilon node. Zero and greater are non-epsilon positions. |
Constructors Summary |
---|
public XSCMLeaf(int type, Object leaf, int id, int position)Constructs a content model leaf.
//
// Constructors
//
super(type);
// Store the element index and position
fLeaf = leaf;
fParticleId = id;
fPosition = position;
|
Methods Summary |
---|
protected void | calcFirstPos(com.sun.org.apache.xerces.internal.impl.dtd.models.CMStateSet toSet)
// If we are an epsilon node, then the first pos is an empty set
if (fPosition == -1)
toSet.zeroBits();
// Otherwise, its just the one bit of our position
else
toSet.setBit(fPosition);
| protected void | calcLastPos(com.sun.org.apache.xerces.internal.impl.dtd.models.CMStateSet toSet)
// If we are an epsilon node, then the last pos is an empty set
if (fPosition == -1)
toSet.zeroBits();
// Otherwise, its just the one bit of our position
else
toSet.setBit(fPosition);
| final java.lang.Object | getLeaf()
return fLeaf;
| final int | getParticleId()
return fParticleId;
| final int | getPosition()
return fPosition;
| public boolean | isNullable()
// Leaf nodes are never nullable unless its an epsilon node
return (fPosition == -1);
| final void | setPosition(int newPosition)
fPosition = newPosition;
| public java.lang.String | toString()
StringBuffer strRet = new StringBuffer(fLeaf.toString());
if (fPosition >= 0) {
strRet.append
(
" (Pos:"
+ new Integer(fPosition).toString()
+ ")"
);
}
return strRet.toString();
|
|