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


Java BIDeclaration类代码示例

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


BIDeclaration类属于com.sun.tools.internal.xjc.reader.xmlschema.bindinfo包,在下文中一共展示了BIDeclaration类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkMultipleSchemaBindings

import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIDeclaration; //导入依赖的package包/类
/** Reports an error if there are more than one jaxb:schemaBindings customization. */
private void checkMultipleSchemaBindings( XSSchema schema ) {
    ArrayList<Locator> locations = new ArrayList<Locator>();

    BindInfo bi = getBindInfo(schema);
    for( BIDeclaration bid : bi ) {
        if( bid.getName()==BISchemaBinding.NAME )
            locations.add( bid.getLocation() );
    }
    if(locations.size()<=1)    return; // OK

    // error
    getErrorReporter().error( locations.get(0),
        Messages.ERR_MULTIPLE_SCHEMA_BINDINGS,
        schema.getTargetNamespace() );
    for( int i=1; i<locations.size(); i++ )
        getErrorReporter().error( (Locator)locations.get(i),
            Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:BGMBuilder.java

示例2: check

import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIDeclaration; //导入依赖的package包/类
private void check(BIDeclaration decl, XSComponent c) {
    if( !decl.isAcknowledged() ) {
        getErrorReporter().error(
            decl.getLocation(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
            decl.getName().getLocalPart()
            );
        getErrorReporter().error(
            c.getLocator(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION);
        // mark it as acknowledged to avoid
        // duplicated error messages.
        decl.markAsAcknowledged();
    }
    for (BIDeclaration d : decl.getChildren())
        check(d,c);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:UnusedCustomizationChecker.java

示例3: getLocalCustomization

import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIDeclaration; //导入依赖的package包/类
protected final <T extends BIDeclaration> T getLocalCustomization( XSParticle p, Class<T> type ) {
    // check the property customization of this component first
    T cust = builder.getBindInfo(p).get(type);
    if(cust!=null)  return cust;

    // if not, the term might have one.
    cust = builder.getBindInfo(p.getTerm()).get(type);
    if(cust!=null)  return cust;

    return null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:ParticleBinder.java


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