当前位置: 首页>>代码示例>>Java>>正文


Java BIProperty.getCustomization方法代码示例

本文整理汇总了Java中com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty.getCustomization方法的典型用法代码示例。如果您正苦于以下问题:Java BIProperty.getCustomization方法的具体用法?Java BIProperty.getCustomization怎么用?Java BIProperty.getCustomization使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty的用法示例。


在下文中一共展示了BIProperty.getCustomization方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: build

import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty; //导入方法依赖的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

示例2: attributeUse

import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty; //导入方法依赖的package包/类
/**
 * Attribute use always becomes a property.
 */
public void attributeUse(XSAttributeUse use) {
    boolean hasFixedValue = use.getFixedValue()!=null;
    BIProperty pc = BIProperty.getCustomization(use);

    // map to a constant property ?
    boolean toConstant = pc.isConstantProperty() && hasFixedValue;
    TypeUse attType = bindAttDecl(use.getDecl());

    CPropertyInfo prop = pc.createAttributeProperty( use, attType );

    if(toConstant) {
        prop.defaultValue = CDefaultValue.create(attType,use.getFixedValue());
        prop.realization = builder.fieldRendererFactory.getConst(prop.realization);
    } else
    if(!attType.isCollection() && (prop.baseType == null ? true : !prop.baseType.isPrimitive())) {
        // don't support a collection default value. That's difficult to do.
        // primitive types default value is problematic too - we can't check whether it has been set or no ( ==null) isn't possible TODO: emit a waring in these cases

        if(use.getDefaultValue()!=null) {
            // this attribute use has a default value.
            // the item type is guaranteed to be a leaf type... or TODO: is it really so?
            // don't support default values if it's a list
            prop.defaultValue = CDefaultValue.create(attType,use.getDefaultValue());
        } else
        if(use.getFixedValue()!=null) {
            prop.defaultValue = CDefaultValue.create(attType,use.getFixedValue());
        }
    } else if(prop.baseType != null && prop.baseType.isPrimitive()) {
        ErrorReporter errorReporter = Ring.get(ErrorReporter.class);

        errorReporter.warning(prop.getLocator(), Messages.WARN_DEFAULT_VALUE_PRIMITIVE_TYPE, prop.baseType.name());
    }

    getCurrentBean().addProperty(prop);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:BindPurple.java

示例3: createSimpleTypeProperty

import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty; //导入方法依赖的package包/类
protected final void createSimpleTypeProperty(XSSimpleType type,String propName) {
    BIProperty prop = BIProperty.getCustomization(type);

    SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class);
    // since we are building the simple type here, use buildDef
    CPropertyInfo p = prop.createValueProperty(propName,false,type,stb.buildDef(type),BGMBuilder.getName(type));
    getCurrentBean().addProperty(p);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:ColorBinder.java


注:本文中的com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty.getCustomization方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。