本文整理汇总了Java中com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx类的典型用法代码示例。如果您正苦于以下问题:Java NamespaceContextEx类的具体用法?Java NamespaceContextEx怎么用?Java NamespaceContextEx使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NamespaceContextEx类属于com.sun.xml.internal.org.jvnet.staxex包,在下文中一共展示了NamespaceContextEx类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: iterator
import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx; //导入依赖的package包/类
public Iterator<NamespaceContextEx.Binding> iterator() {
if (namespacePosition == 2)
return Collections.EMPTY_LIST.iterator();
final List<NamespaceContextEx.Binding> namespaces =
new ArrayList<NamespaceContextEx.Binding>(namespacePosition);
NAMESPACE_LOOP: for (int i = namespacePosition - 1; i >= 2; i--) {
final String declaredPrefix = prefixes[i];
// Check if prefix is out of scope
for (int j = i + 1; j < namespacePosition; j++) {
if (declaredPrefix == prefixes[j])
continue NAMESPACE_LOOP;
namespaces.add(new NamespaceBindingImpl(i));
}
}
return namespaces.iterator();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:NamespaceContexHelper.java
示例2: getNamespaceContext
import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx; //导入依赖的package包/类
@Override
public NamespaceContextEx getNamespaceContext() {
switch (state) {
case StartTag:
case EndTag: return new NamespaceContextExAdaper(elemInfo);
case Payload:
default:
return isPayloadReaderEx()?
payloadReaderEx().getNamespaceContext() :
new NamespaceContextExAdaper(payloadReader.getNamespaceContext());
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:XMLReaderComposite.java
示例3: getNamespaceContext
import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx; //导入依赖的package包/类
public NamespaceContextEx getNamespaceContext() {
return namespaceContext;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:StreamWriterBufferCreator.java
示例4: getNamespaceContext
import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx; //导入依赖的package包/类
public final NamespaceContextEx getNamespaceContext() {
return _nsCtx;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:StreamReaderBufferProcessor.java
示例5: iterator
import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx; //导入依赖的package包/类
public Iterator<NamespaceContextEx.Binding> iterator() {
return new Iterator<NamespaceContextEx.Binding>() {
private final int end = _namespaceAIIsEnd - 1;
private int current = end;
private boolean requireFindNext = true;
private NamespaceContextEx.Binding namespace;
private NamespaceContextEx.Binding findNext() {
while(current >= 0) {
final String prefix = _namespaceAIIsPrefix[current];
// Find if the current prefix occurs more recently
// If so then it is not in scope
int i = end;
for (;i > current; i--) {
if (prefix.equals(_namespaceAIIsPrefix[i])) {
break;
}
}
if (i == current--) {
// The current prefix is in-scope
return namespace = new BindingImpl(prefix, _namespaceAIIsNamespaceName[current]);
}
}
return namespace = null;
}
public boolean hasNext() {
if (requireFindNext) {
findNext();
requireFindNext = false;
}
return (namespace != null);
}
public NamespaceContextEx.Binding next() {
if (requireFindNext) {
findNext();
}
requireFindNext = true;
if (namespace == null) {
throw new NoSuchElementException();
}
return namespace;
}
public void remove() {
throw new UnsupportedOperationException();
}
};
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:54,代码来源:StreamReaderBufferProcessor.java
示例6: getNamespaceContext
import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx; //导入依赖的package包/类
@Override
public NamespaceContextEx getNamespaceContext() {
NamespaceContext nsContext = writer.getNamespaceContext();
return new MtomNamespaceContextEx(nsContext);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:MtomCodec.java
注:本文中的com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论