本文整理汇总了Java中com.sun.xml.internal.rngom.ast.builder.BuildException类的典型用法代码示例。如果您正苦于以下问题:Java BuildException类的具体用法?Java BuildException怎么用?Java BuildException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BuildException类属于com.sun.xml.internal.rngom.ast.builder包,在下文中一共展示了BuildException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeGroup
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public ParsedPattern makeGroup(List patterns,
Location _loc, Annotations _anno) throws BuildException {
List<ParsedPattern> lp = new ArrayList<ParsedPattern>();
List<ParsedPattern> rp = new ArrayList<ParsedPattern>();
for( int i=0; i<patterns.size(); i++ ) {
lp.add( ((ParsedPatternHost)patterns.get(i)).lhs);
rp.add( ((ParsedPatternHost)patterns.get(i)).rhs);
}
LocationHost loc = cast(_loc);
AnnotationsHost anno = cast(_anno);
return new ParsedPatternHost(
lhs.makeGroup(lp, loc.lhs, anno.lhs),
rhs.makeGroup(rp, loc.rhs, anno.rhs));
}
示例2: makeInterleave
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public ParsedPattern makeInterleave(List patterns,
Location _loc, Annotations _anno) throws BuildException {
List<ParsedPattern> lp = new ArrayList<ParsedPattern>();
List<ParsedPattern> rp = new ArrayList<ParsedPattern>();
for( int i=0; i<patterns.size(); i++ ) {
lp.add( ((ParsedPatternHost)patterns.get(i)).lhs);
rp.add( ((ParsedPatternHost)patterns.get(i)).rhs);
}
LocationHost loc = cast(_loc);
AnnotationsHost anno = cast(_anno);
return new ParsedPatternHost(
lhs.makeInterleave(lp, loc.lhs, anno.lhs),
rhs.makeInterleave(rp, loc.rhs, anno.rhs));
}
示例3: makeDataPatternBuilder
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
throws BuildException {
DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
if (dl == null) {
error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
} else {
try {
return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
} catch (DatatypeException e) {
String detail = e.getMessage();
if (detail != null) {
error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
} else {
error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
}
}
}
return new DummyDataPatternBuilder();
}
示例4: makeExternalRef
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope scope,
Location loc, Annotations anno)
throws BuildException {
for (OpenIncludes inc = openIncludes;
inc != null;
inc = inc.parent) {
if (inc.uri.equals(uri)) {
error("recursive_include", uri, (Locator) loc);
return pb.makeError();
}
}
try {
return current.parseExternal(uri, new SchemaBuilderImpl(ns, uri, this), scope, ns);
} catch (IllegalSchemaException e) {
noteError();
return pb.makeError();
}
}
示例5: makeChoice
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public ParsedPattern makeChoice(List patterns,
Location _loc, Annotations _anno) throws BuildException {
List<ParsedPattern> lp = new ArrayList<ParsedPattern>();
List<ParsedPattern> rp = new ArrayList<ParsedPattern>();
for( int i=0; i<patterns.size(); i++ ) {
lp.add( ((ParsedPatternHost)patterns.get(i)).lhs);
rp.add( ((ParsedPatternHost)patterns.get(i)).rhs);
}
LocationHost loc = cast(_loc);
AnnotationsHost anno = cast(_anno);
return new ParsedPatternHost(
lhs.makeChoice(lp, loc.lhs, anno.lhs),
rhs.makeChoice(rp, loc.rhs, anno.rhs));
}
示例6: makeDataPatternBuilder
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary,
String type, Location _loc) throws BuildException {
LocationHost loc = cast(_loc);
return new DataPatternBuilderHost(
lhs.makeDataPatternBuilder(datatypeLibrary, type, loc.lhs),
rhs.makeDataPatternBuilder(datatypeLibrary, type, loc.rhs) );
}
示例7: toBuildException
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
static BuildException toBuildException(SAXException e) {
Exception inner = e.getException();
if (inner instanceof BuildException)
throw (BuildException)inner;
throw new BuildException(e);
}
示例8: makeZeroOrMore
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public ParsedPattern makeZeroOrMore(ParsedPattern _p, Location _loc,
Annotations _anno) throws BuildException {
ParsedPatternHost p = (ParsedPatternHost) _p;
LocationHost loc = cast(_loc);
AnnotationsHost anno = cast(_anno);
return new ParsedPatternHost(
lhs.makeZeroOrMore(p.lhs, loc.lhs, anno.lhs),
rhs.makeZeroOrMore(p.rhs, loc.rhs, anno.rhs));
}
示例9: makeOneOrMore
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public ParsedPattern makeOneOrMore(ParsedPattern _p, Location _loc,
Annotations _anno) throws BuildException {
ParsedPatternHost p = (ParsedPatternHost) _p;
LocationHost loc = cast(_loc);
AnnotationsHost anno = cast(_anno);
return new ParsedPatternHost(
lhs.makeOneOrMore(p.lhs, loc.lhs, anno.lhs),
rhs.makeOneOrMore(p.rhs, loc.rhs, anno.rhs));
}
示例10: makePattern
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno)
throws BuildException {
try {
return pb.makeDataExcept(dtb.createDatatype(), (Pattern) except, (Locator) loc);
} catch (DatatypeException e) {
String detail = e.getMessage();
if (detail != null) {
error("invalid_params_detail", detail, (Locator) loc);
} else {
error("invalid_params", (Locator) loc);
}
return pb.makeError();
}
}
示例11: makeExternalRef
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public ParsedPattern makeExternalRef(Parseable current, String uri,
String ns, Scope _scope, Location _loc, Annotations _anno)
throws BuildException, IllegalSchemaException {
ScopeHost scope = (ScopeHost) _scope;
LocationHost loc = cast(_loc);
AnnotationsHost anno = cast(_anno);
return new ParsedPatternHost(
lhs.makeExternalRef(current, uri, ns, scope.lhs, loc.lhs, anno.lhs),
rhs.makeExternalRef(current, uri, ns, scope.rhs, loc.rhs, anno.rhs) );
}
示例12: makeChoice
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public ParsedPattern makeChoice(List patterns, Location loc, Annotations anno)
throws BuildException {
if (patterns.isEmpty()) {
throw new IllegalArgumentException();
}
Pattern result = (Pattern) patterns.get(0);
for (int i = 1; i < patterns.size(); i++) {
result = pb.makeChoice(result, (Pattern) patterns.get(i));
}
return result;
}
示例13: annotateAfter
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public ParsedPattern annotateAfter(ParsedPattern _p,
ParsedElementAnnotation _e) throws BuildException {
ParsedPatternHost p = (ParsedPatternHost) _p;
ParsedElementAnnotationHost e = (ParsedElementAnnotationHost) _e;
return new ParsedPatternHost(
lhs.annotateAfter(p.lhs, e.lhs),
rhs.annotateAfter(p.rhs, e.rhs));
}
示例14: define
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
@Override
public void define(String name, Combine combine, ParsedPattern pattern, Location loc, Annotations anno) throws BuildException {
super.define(name, combine, pattern, loc, anno);
if(name==START)
startOverriden = true;
else
overridenPatterns.add(name);
}
示例15: makeOptional
import com.sun.xml.internal.rngom.ast.builder.BuildException; //导入依赖的package包/类
public ParsedPattern makeOptional(ParsedPattern _p, Location _loc,
Annotations _anno) throws BuildException {
ParsedPatternHost p = (ParsedPatternHost) _p;
LocationHost loc = cast(_loc);
AnnotationsHost anno = cast(_anno);
return new ParsedPatternHost(
lhs.makeOptional(p.lhs, loc.lhs, anno.lhs),
rhs.makeOptional(p.rhs, loc.rhs, anno.rhs));
}