• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Location类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: addParam

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno)
        throws BuildException {
    try {
        dtb.addParameter(name, value, new ValidationContextImpl(context, ns));
    } catch (DatatypeException e) {
        String detail = e.getMessage();
        int pos = e.getIndex();
        String displayedParam;
        if (pos == DatatypeException.UNKNOWN) {
            displayedParam = null;
        } else {
            displayedParam = displayParam(value, pos);
        }
        if (displayedParam != null) {
            if (detail != null) {
                error("invalid_param_detail_display", detail, displayedParam, (Locator) loc);
            } else {
                error("invalid_param_display", displayedParam, (Locator) loc);
            }
        } else if (detail != null) {
            error("invalid_param_detail", detail, (Locator) loc);
        } else {
            error("invalid_param", (Locator) loc);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:SchemaBuilderImpl.java


示例2: makeDataPatternBuilder

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的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();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:SchemaBuilderImpl.java


示例3: endGrammar

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException {
    for (Enumeration e = defines.keys();
            e.hasMoreElements();) {
        String name = (String) e.nextElement();
        RefPattern rp = (RefPattern) defines.get(name);
        if (rp.getPattern() == null) {
            sb.error("reference_to_undefined", name, rp.getRefLocator());
            rp.setPattern(sb.pb.makeError());
        }
    }
    Pattern start = startRef.getPattern();
    if (start == null) {
        sb.error("missing_start_element", (Locator) loc);
        start = sb.pb.makeError();
    }
    return start;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:SchemaBuilderImpl.java


示例4: startElement

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
public void startElement(String namespaceURI, String localName,
        String qName, Attributes atts) {
    flushText();
    if (builder != null) {
        builderStack.push(builder);
    }
    Location loc = makeLocation();
    builder = schemaBuilder.makeElementAnnotationBuilder(namespaceURI,
            localName,
            findPrefix(qName, namespaceURI),
            loc,
            getComments(),
            getContext());
    int len = atts.getLength();
    for (int i = 0; i < len; i++) {
        String uri = atts.getURI(i);
        builder.addAttribute(uri, atts.getLocalName(i), findPrefix(atts.getQName(i), uri),
                atts.getValue(i), loc);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:21,代码来源:SchemaParser.java


示例5: makeExternalRef

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的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();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:SchemaBuilderImpl.java


示例6: makeGroup

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的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));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:SchemaBuilderHost.java


示例7: makeInterleave

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的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));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:SchemaBuilderHost.java


示例8: endGrammar

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
public ParsedPattern endGrammar(Location _loc, Annotations _anno) throws BuildException {
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedPatternHost(
        lhs.endGrammar(loc.lhs, anno.lhs),
        rhs.endGrammar(loc.rhs, anno.rhs));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:GrammarHost.java


示例9: makePattern

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的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();
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:SchemaBuilderImpl.java


示例10: define

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
@Override
public void define(String name, Combine combine, ParsedPattern pattern, Location loc, Annotations anno) throws BuildException {
    // check for overridden pattern
    if(name==START) {
        if(startOverriden)
            return;
    } else {
        if(overridenPatterns.contains(name))
            return;
    }
    // otherwise define
    super.define(name, combine, pattern, loc, anno);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:IncludeImpl.java


示例11: define

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的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);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:IncludeImpl.java


示例12: Param

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
public Param(String name, String value, Context context, String ns, Location loc, Annotation anno) {
    this.name = name;
    this.value = value;
    this.context = context;
    this.ns = ns;
    this.loc = loc;
    this.anno = anno;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:DDataPattern.java


示例13: addComment

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
public void addComment(String value, Location _loc) throws BuildException {
    LocationHost loc = cast(_loc);
    if(lhs!=null)
        lhs.addComment(value,loc.lhs);
    if(rhs!=null)
        rhs.addComment(value,loc.rhs);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:CommentListHost.java


示例14: makeChoice

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:SchemaBuilderImpl.java


示例15: makeGroup

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
public ParsedPattern makeGroup(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.makeGroup(result, (Pattern) patterns.get(i));
    }
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:SchemaBuilderImpl.java


示例16: makeInterleave

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
public ParsedPattern makeInterleave(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.makeInterleave(result, (Pattern) patterns.get(i));
    }
    return result;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:SchemaBuilderImpl.java


示例17: makeNsName

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
public ParsedNameClass makeNsName(String ns, Location _loc, Annotations _anno) {
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedNameClassHost(
        lhs.makeNsName( ns, loc.lhs, anno.lhs ),
        rhs.makeNsName( ns, loc.rhs, anno.rhs ) );
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:NameClassBuilderHost.java


示例18: makeMixed

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
public ParsedPattern makeMixed(ParsedPattern _p, Location _loc,
    Annotations _anno) throws BuildException {

    ParsedPatternHost p = (ParsedPatternHost) _p;
    LocationHost loc = cast(_loc);
    AnnotationsHost anno = cast(_anno);

    return new ParsedPatternHost(
        lhs.makeMixed(p.lhs, loc.lhs, anno.lhs),
        rhs.makeMixed(p.rhs, loc.rhs, anno.rhs));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:SchemaBuilderHost.java


示例19: makeZeroOrMore

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的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));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:SchemaBuilderHost.java


示例20: endGrammar

import com.sun.xml.internal.rngom.ast.om.Location; //导入依赖的package包/类
public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException {
    // Harshit : Fixed possible NPE and issue in handling of annotations
    if (anno != null) {
        if (grammar.annotation != null) {
            grammar.annotation.contents.addAll(((Annotation) anno).getResult().contents);
        }
    }
    return grammar;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:GrammarBuilderImpl.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java OAuthAuthorizeTemporaryTokenUrl类代码示例发布时间:2022-05-23
下一篇:
Java StepSound类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap