本文整理汇总了Java中com.sun.tools.internal.xjc.model.CBuiltinLeafInfo类的典型用法代码示例。如果您正苦于以下问题:Java CBuiltinLeafInfo类的具体用法?Java CBuiltinLeafInfo怎么用?Java CBuiltinLeafInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CBuiltinLeafInfo类属于com.sun.tools.internal.xjc.model包,在下文中一共展示了CBuiltinLeafInfo类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getTypeUse
import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo; //导入依赖的package包/类
public TypeUse getTypeUse(XSSimpleType owner) {
if(typeUse!=null)
return typeUse;
JCodeModel cm = getCodeModel();
JDefinedClass a;
try {
a = cm._class(adapter);
a.hide(); // we assume this is given by the user
a._extends(cm.ref(XmlAdapter.class).narrow(String.class).narrow(
cm.ref(type)));
} catch (JClassAlreadyExistsException e) {
a = e.getExistingClass();
}
// TODO: it's not correct to say that it adapts from String,
// but OTOH I don't think we can compute that.
typeUse = TypeUseFactory.adapt(
CBuiltinLeafInfo.STRING,
new CAdapter(a));
return typeUse;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:BIConversion.java
示例2: build
import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo; //导入依赖的package包/类
public void build(XSComplexType ct) {
XSContentType contentType = ct.getContentType();
builder.recordBindingMode(ct, FALLBACK_CONTENT);
BIProperty prop = BIProperty.getCustomization(ct);
CPropertyInfo p;
if(contentType.asEmpty()!=null) {
p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null);
} else {
RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false);
p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false);
}
selector.getCurrentBean().addProperty(p);
// adds attributes and we are through.
green.attContainer(ct);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:MultiWildcardComplexTypeBuilder.java
示例3: ClassSelector
import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo; //导入依赖的package包/类
public ClassSelector() {
classBinder = new Abstractifier(new DefaultClassBinder());
Ring.add(ClassBinder.class,classBinder);
classScopes.push(null); // so that the getClassFactory method returns null
XSComplexType anyType = Ring.get(XSSchemaSet.class).getComplexType(WellKnownNamespace.XML_SCHEMA,"anyType");
bindMap.put(anyType,new Binding(anyType,CBuiltinLeafInfo.ANYTYPE));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:ClassSelector.java
示例4: unionSimpleType
import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo; //导入依赖的package包/类
public TypeUse unionSimpleType(XSUnionSimpleType type) {
boolean isCollection = false;
for( int i=0; i<type.getMemberSize(); i++ )
if(type.getMember(i).getVariety()==XSVariety.LIST || type.getMember(i).getVariety()==XSVariety.UNION) {
isCollection = true;
break;
}
TypeUse r = CBuiltinLeafInfo.STRING;
if(isCollection)
r = TypeUseFactory.makeCollection(r);
return r;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:SimpleTypeBuilder.java
示例5: create
import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo; //导入依赖的package包/类
/** Creates a global enumeration declaration. */
static BIEnumeration create( Element dom, BindInfo parent ) {
// create a class in the target package.
return new BIEnumeration(
dom,
new CEnumLeafInfo(
parent.model,
null,
new CClassInfoParent.Package(parent.getTargetPackage()),
DOMUtil.getAttribute(dom,"name"),
CBuiltinLeafInfo.STRING,
buildMemberList(parent.model,dom),
null, null/*TODO*/,
DOMLocator.getLocationInfo(dom)));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:BIEnumeration.java
示例6: onDataType
import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo; //导入依赖的package包/类
private TypeUse onDataType(String datatypeLibrary, String type) {
DatatypeLib lib = compiler.datatypes.get(datatypeLibrary);
if(lib!=null) {
TypeUse use = lib.get(type);
if(use!=null)
return use;
}
// unknown
return CBuiltinLeafInfo.STRING;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:TypeUseBinder.java
示例7: onContainer
import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo; //导入依赖的package包/类
private TypeUse onContainer(DContainerPattern p) {
TypeUse t=null;
for( DPattern child : p ) {
TypeUse s = child.accept(this);
if(t!=null && t!=s)
return CBuiltinLeafInfo.STRING; // heterogenous
t = s;
}
return t;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:TypeUseBinder.java
注:本文中的com.sun.tools.internal.xjc.model.CBuiltinLeafInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论