org.jbind.xml.instance.use
Class ContentUseState

java.lang.Object
  extended byorg.jbind.xml.instance.use.ContentUseState
All Implemented Interfaces:
IUseState
Direct Known Subclasses:
ElemUseState, GroupUseState

public abstract class ContentUseState
extends java.lang.Object
implements IUseState


Constructor Summary
ContentUseState(IContentDesc aContent, IUseState aParent)
           
 
Method Summary
protected abstract  void doIsValidEnd(IHasLocation aHasLocation)
           
protected  void doReset()
           
 IContentDesc getContentDesc()
          Gets the content of the use node.
 IUseState getParent()
          Gets the parent.
 int getUseCounter()
          Gets the use counter.
protected  void incrementUseCounter()
           
 void isValidEnd(IHasLocation aHasLocation)
           
protected  boolean mayIncrementUseCounter()
           
 void reset()
          Resets the the use state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.core.content.IUseState
getNextUseState
 

Constructor Detail

ContentUseState

public ContentUseState(IContentDesc aContent,
                       IUseState aParent)
Method Detail

getContentDesc

public IContentDesc getContentDesc()
Description copied from interface: IUseState
Gets the content of the use node.

Specified by:
getContentDesc in interface IUseState
Returns:
(required).

getParent

public IUseState getParent()
Description copied from interface: IUseState
Gets the parent.

Specified by:
getParent in interface IUseState
Returns:
(optional).

getUseCounter

public int getUseCounter()
Description copied from interface: IUseState
Gets the use counter. The use counter counts the number of method invokations of the getNextUseState method that returned a non-null result. In other words it counts the number of times an element was processed with this use state.

Specified by:
getUseCounter in interface IUseState
Returns:
The number of times the use state returned a non-null next use state.

incrementUseCounter

protected void incrementUseCounter()

mayIncrementUseCounter

protected boolean mayIncrementUseCounter()

reset

public final void reset()
Description copied from interface: IUseState
Resets the the use state. The use counter is set to 0 and any additional internal usage state is also reset.

Specified by:
reset in interface IUseState

doReset

protected void doReset()

isValidEnd

public void isValidEnd(IHasLocation aHasLocation)
                throws XmlException
Specified by:
isValidEnd in interface IUseState
Throws:
XmlException

doIsValidEnd

protected abstract void doIsValidEnd(IHasLocation aHasLocation)
                              throws XmlException
Throws:
XmlException