|
|||||||||||||||||||
This license of Clover is provided to support the development of JBind only. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover. | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
ChoiceUseState.java | 100% | 100% | 100% | 100% |
|
1 |
/* |
|
2 |
* JBind |
|
3 |
* |
|
4 |
* Copyright (c) by Stefan Wachter. All rights reserved. |
|
5 |
* |
|
6 |
* Usage, modification, and redistribution is subject to license terms that are |
|
7 |
* available at 'http://www.jbind.org'. The JBind license is like the |
|
8 |
* 'Apache Software License V 1.1'. |
|
9 |
*/ |
|
10 |
package org.jbind.xml.instance.use; |
|
11 |
|
|
12 |
import java.util.Iterator; |
|
13 |
|
|
14 |
import org.jbind.xml.base.IHasLocation; |
|
15 |
import org.jbind.xml.core.content.IChoiceDesc; |
|
16 |
import org.jbind.xml.core.content.IElemUseState; |
|
17 |
import org.jbind.xml.core.content.IUseState; |
|
18 |
import org.jbind.xml.core.type.IAnyType; |
|
19 |
import org.jbind.xml.msg.XmlException; |
|
20 |
|
|
21 |
public class ChoiceUseState extends GroupUseState { |
|
22 |
|
|
23 | 760 |
public ChoiceUseState(IChoiceDesc aContent, IUseState aParent) { |
24 | 760 |
super(aContent, aParent); |
25 |
} |
|
26 |
|
|
27 | 1806 |
public IElemUseState getNextUseState(String aNamespace, String aName, IAnyType anOverloadingType, IHasLocation aHasLocation) throws XmlException { |
28 | 1806 |
IElemUseState res = null; |
29 | 1806 |
if (mayIncrementUseCounter()) { |
30 | 1490 |
for (Iterator i = iterUseStates(); (null == res) && i.hasNext(); ) { |
31 | 3856 |
IUseState us = (IUseState)i.next(); |
32 | 3856 |
res = us.getNextUseState(aNamespace, aName, anOverloadingType, aHasLocation); |
33 |
} |
|
34 |
} |
|
35 | 1806 |
if (null != res) { |
36 | 1402 |
incrementUseCounter(); |
37 |
} |
|
38 | 1806 |
return res; |
39 |
} |
|
40 |
|
|
41 | 644 |
protected void doIsValidEnd(IHasLocation aHasLocation) throws XmlException {} |
42 |
|
|
43 |
|
|
44 |
} |
|
45 |
|
|