本文整理汇总了Java中com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIXSubstitutable类的典型用法代码示例。如果您正苦于以下问题:Java BIXSubstitutable类的具体用法?Java BIXSubstitutable怎么用?Java BIXSubstitutable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BIXSubstitutable类属于com.sun.tools.internal.xjc.reader.xmlschema.bindinfo包,在下文中一共展示了BIXSubstitutable类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: canBeType
import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIXSubstitutable; //导入依赖的package包/类
protected RawTypeSet.Mode canBeType(RawTypeSet parent) {
// if element substitution can occur, no way it can be mapped to a list of types
if(decl.getSubstitutables().size()>1)
return RawTypeSet.Mode.MUST_BE_REFERENCE;
// BIXSubstitutable also simulates this effect. Useful for separate compilation
BIXSubstitutable subst = builder.getBindInfo(decl).get(BIXSubstitutable.class);
if(subst!=null) {
subst.markAsAcknowledged();
return RawTypeSet.Mode.MUST_BE_REFERENCE;
}
// we have no place to put an adater if this thing maps to a type
CElementPropertyInfo p = target.getProperty();
// if we have an adapter or IDness, which requires special
// annotation, and there's more than one element,
// we have no place to put the special annotation, so we need JAXBElement.
if((parent.refs.size()>1 || !parent.mul.isAtMostOnce()) && p.id()!=ID.NONE)
return RawTypeSet.Mode.MUST_BE_REFERENCE;
if(parent.refs.size() > 1 && p.getAdapter() != null)
return RawTypeSet.Mode.MUST_BE_REFERENCE;
if(target.hasClass())
// if the CElementInfo was explicitly bound to a class (which happen if and only if
// the user requested so, then map that to reference property so that the user sees a class
return RawTypeSet.Mode.CAN_BE_TYPEREF;
else
return RawTypeSet.Mode.SHOULD_BE_TYPEREF;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:RawTypeSetBuilder.java
注:本文中的com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIXSubstitutable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论