本文整理汇总了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);
}
示例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);
}
示例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;
}