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


Java XSComponent.getOwnerSchema方法代码示例

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


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

示例1: iterator

import com.sun.xml.internal.xsom.XSComponent; //导入方法依赖的package包/类
public Iterator<XSSchema> iterator(Iterator<? extends XSComponent> contextNodes) {
    return new Iterators.Adapter<XSSchema,XSComponent>(contextNodes) {
        protected XSSchema filter(XSComponent u) {
            return u.getOwnerSchema();
        }
    };
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:Axis.java

示例2: deriveName

import com.sun.xml.internal.xsom.XSComponent; //导入方法依赖的package包/类
/**
 * Derives a name from a schema component.
 *
 * This method handles prefix/suffix modification and
 * XML-to-Java name conversion.
 *
 * @param name
 *      The base name. This should be things like element names
 *      or type names.
 * @param comp
 *      The component from which the base name was taken.
 *      Used to determine how names are modified.
 */
public String deriveName( String name, XSComponent comp ) {
    XSSchema owner = comp.getOwnerSchema();

    name = getNameConverter().toClassName(name);

    if( owner!=null ) {
        BISchemaBinding sb = getBindInfo(owner).get(BISchemaBinding.class);

        if(sb!=null)    name = sb.mangleClassName(name,comp);
    }

    return name;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:BGMBuilder.java

示例3: _bindToClass

import com.sun.xml.internal.xsom.XSComponent; //导入方法依赖的package包/类
/**
 * The real meat of the "bindToType" code.
 *
 * @param cannotBeDelayed
 *      if the binding of the body of the class cannot be defered
 *      and needs to be done immediately. If the flag is false,
 *      the binding of the body will be done later, to avoid
 *      cyclic binding problem.
 * @param referer
 *      The component that refers to <tt>sc</tt>. This can be null,
 *      if figuring out the referer is too hard, in which case
 *      the error message might be less user friendly.
 */
// TODO: consider getting rid of "cannotBeDelayed"
CTypeInfo _bindToClass( @NotNull XSComponent sc, XSComponent referer, boolean cannotBeDelayed ) {
    // check if this class is already built.
    if(!bindMap.containsKey(sc)) {
        // craete a bind task

        // if this is a global declaration, make sure they will be generated
        // under a package.
        boolean isGlobal = false;
        if( sc instanceof XSDeclaration ) {
            isGlobal = ((XSDeclaration)sc).isGlobal();
            if( isGlobal )
                pushClassScope( new CClassInfoParent.Package(
                    getPackage(((XSDeclaration)sc).getTargetNamespace())) );
        }

        // otherwise check if this component should become a class.
        CElement bean = sc.apply(classBinder);

        if( isGlobal )
            popClassScope();

        if(bean==null)
            return null;

        // can this namespace generate a class?
        if (bean instanceof CClassInfo) {
            XSSchema os = sc.getOwnerSchema();
            BISchemaBinding sb = builder.getBindInfo(os).get(BISchemaBinding.class);
            if(sb!=null && !sb.map) {
                // nope
                getErrorReporter().error(sc.getLocator(),
                    Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS, sc.apply( new ComponentNameFunction() ) );
                getErrorReporter().error(sb.getLocation(),
                    Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE, os.getTargetNamespace() );
                if(referer!=null)
                    getErrorReporter().error(referer.getLocator(),
                        Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER, referer.apply( new ComponentNameFunction() ) );
            }
        }


        queueBuild( sc, bean );
    }

    Binding bind = bindMap.get(sc);
    if( cannotBeDelayed )
        bind.build();

    return bind.bean;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:65,代码来源:ClassSelector.java

示例4: _bindToClass

import com.sun.xml.internal.xsom.XSComponent; //导入方法依赖的package包/类
/**
 * The real meat of the "bindToType" code.
 *
 * @param cannotBeDelayed
 *      if the binding of the body of the class cannot be defered
 *      and needs to be done immediately. If the flag is false,
 *      the binding of the body will be done later, to avoid
 *      cyclic binding problem.
 * @param referer
 *      The component that refers to {@code sc}. This can be null,
 *      if figuring out the referer is too hard, in which case
 *      the error message might be less user friendly.
 */
// TODO: consider getting rid of "cannotBeDelayed"
CTypeInfo _bindToClass( @NotNull XSComponent sc, XSComponent referer, boolean cannotBeDelayed ) {
    // check if this class is already built.
    if(!bindMap.containsKey(sc)) {
        // craete a bind task

        // if this is a global declaration, make sure they will be generated
        // under a package.
        boolean isGlobal = false;
        if( sc instanceof XSDeclaration ) {
            isGlobal = ((XSDeclaration)sc).isGlobal();
            if( isGlobal )
                pushClassScope( new CClassInfoParent.Package(
                    getPackage(((XSDeclaration)sc).getTargetNamespace())) );
        }

        // otherwise check if this component should become a class.
        CElement bean = sc.apply(classBinder);

        if( isGlobal )
            popClassScope();

        if(bean==null)
            return null;

        // can this namespace generate a class?
        if (bean instanceof CClassInfo) {
            XSSchema os = sc.getOwnerSchema();
            BISchemaBinding sb = builder.getBindInfo(os).get(BISchemaBinding.class);
            if(sb!=null && !sb.map) {
                // nope
                getErrorReporter().error(sc.getLocator(),
                    Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS, sc.apply( new ComponentNameFunction() ) );
                getErrorReporter().error(sb.getLocation(),
                    Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE, os.getTargetNamespace() );
                if(referer!=null)
                    getErrorReporter().error(referer.getLocator(),
                        Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER, referer.apply( new ComponentNameFunction() ) );
            }
        }


        queueBuild( sc, bean );
    }

    Binding bind = bindMap.get(sc);
    if( cannotBeDelayed )
        bind.build();

    return bind.bean;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:65,代码来源:ClassSelector.java


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