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

Java Ref类代码示例

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

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



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

示例1: getTypeInfo

import com.sun.xml.internal.bind.v2.model.core.Ref; //导入依赖的package包/类
/**
 * This method is used to add a root reference to a model.
 */
public NonElement<T,C> getTypeInfo(Ref<T,C> ref) {
    // TODO: handle XmlValueList
    assert !ref.valueList;
    C c = nav.asDecl(ref.type);
    if(c!=null && reader.getClassAnnotation(XmlRegistry.class,c,null/*TODO: is this right?*/)!=null) {
        return null;    // TODO: is this correct?
    } else
        return getTypeInfo(ref.type);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:TypeInfoSetImpl.java


示例2: getTypeInfo

import com.sun.xml.internal.bind.v2.model.core.Ref; //导入依赖的package包/类
/**
 * This method is used to add a root reference to a model.
 */
public NonElement<T,C> getTypeInfo(Ref<T,C> ref) {
    // TODO: handle XmlValueList
    assert !ref.valueList;
    C c = nav.asDecl(ref.type);
    if(c!=null && reader.getClassAnnotation(XmlRegistry.class,c,null/*TODO: is this right?*/)!=null) {
        if(!registries.containsKey(nav.getPackageName(c)))
            addRegistry(c,null);
        return null;    // TODO: is this correct?
    } else
        return getTypeInfo(ref.type,null);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:ModelBuilder.java


示例3: getXmlType

import com.sun.xml.internal.bind.v2.model.core.Ref; //导入依赖的package包/类
private NonElement<Type,Class> getXmlType(RuntimeTypeInfoSet tis, TypeReference tr) {
    if(tr==null)
        throw new IllegalArgumentException();

    XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class);
    XmlList xl = tr.get(XmlList.class);

    Ref<Type,Class> ref = new Ref<Type,Class>(annotationReader, tis.getNavigator(), tr.type, xjta, xl );

    return tis.getTypeInfo(ref);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:JAXBContextImpl.java


示例4: bind

import com.sun.xml.internal.bind.v2.model.core.Ref; //导入依赖的package包/类
public J2SJAXBModel bind(
    Collection<Reference> rootClasses,
    Map<QName,Reference> additionalElementDecls,
    String defaultNamespaceRemap,
    ProcessingEnvironment env) {

    ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
            new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
            InlineAnnotationReaderImpl.theInstance,
            new ApNavigator(env),
            Collections.<TypeElement, TypeElement>emptyMap(),
            defaultNamespaceRemap );

    builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));

    for ( Reference ref : rootClasses ) {
        TypeMirror t = ref.type;

        XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
        XmlList xl = ref.annotations.getAnnotation(XmlList.class);

        builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
    }

    TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
    if(r==null)     return null;

    if(additionalElementDecls==null)
        additionalElementDecls = Collections.emptyMap();
    else {
        // fool proof check
        for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
            if(e.getKey()==null)
                throw new IllegalArgumentException("nulls in additionalElementDecls");
        }
    }
    return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:JavaCompilerImpl.java


示例5: getXmlType

import com.sun.xml.internal.bind.v2.model.core.Ref; //导入依赖的package包/类
private NonElement<TypeMirror, TypeElement> getXmlType(Reference r) {
    if(r==null)
        throw new IllegalArgumentException();

    XmlJavaTypeAdapter xjta = r.annotations.getAnnotation(XmlJavaTypeAdapter.class);
    XmlList xl = r.annotations.getAnnotation(XmlList.class);

    Ref<TypeMirror, TypeElement> ref = new Ref<TypeMirror, TypeElement>(
        reader,types.getNavigator(),r.type,xjta,xl);

    return types.getTypeInfo(ref);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:JAXBModelImpl.java


示例6: bind

import com.sun.xml.internal.bind.v2.model.core.Ref; //导入依赖的package包/类
public J2SJAXBModel bind(
    Collection<Reference> rootClasses,
    Map<QName,Reference> additionalElementDecls,
    String defaultNamespaceRemap,
    AnnotationProcessorEnvironment env) {

    ModelBuilder<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration> builder =
        new ModelBuilder<TypeMirror,TypeDeclaration,FieldDeclaration,MethodDeclaration>(
            InlineAnnotationReaderImpl.theInstance,
            new APTNavigator(env),
            Collections.<TypeDeclaration,TypeDeclaration>emptyMap(),
            defaultNamespaceRemap );

    builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));

    for( Reference ref : rootClasses ) {
        TypeMirror t = ref.type;

        XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
        XmlList xl = ref.annotations.getAnnotation(XmlList.class);

        builder.getTypeInfo(new Ref<TypeMirror,TypeDeclaration>(builder,t,xjta,xl));
    }

    TypeInfoSet r = builder.link();
    if(r==null)     return null;

    if(additionalElementDecls==null)
        additionalElementDecls = Collections.emptyMap();
    else {
        // fool proof check
        for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
            if(e.getKey()==null)
                throw new IllegalArgumentException("nulls in additionalElementDecls");
        }
    }
    return new JAXBModelImpl(r,builder.reader,rootClasses,new HashMap(additionalElementDecls));
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:39,代码来源:JavaCompilerImpl.java


示例7: getXmlType

import com.sun.xml.internal.bind.v2.model.core.Ref; //导入依赖的package包/类
private NonElement<TypeMirror,TypeDeclaration> getXmlType(Reference r) {
    if(r==null)
        throw new IllegalArgumentException();

    XmlJavaTypeAdapter xjta = r.annotations.getAnnotation(XmlJavaTypeAdapter.class);
    XmlList xl = r.annotations.getAnnotation(XmlList.class);

    Ref<TypeMirror, TypeDeclaration> ref = new Ref<TypeMirror, TypeDeclaration>(
        reader,types.getNavigator(),r.type,xjta,xl);

    return types.getTypeInfo(ref);
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:13,代码来源:JAXBModelImpl.java


示例8: getTypeInfo

import com.sun.xml.internal.bind.v2.model.core.Ref; //导入依赖的package包/类
public CNonElement getTypeInfo(Ref<NType,NClass> ref) {
    // TODO: handle XmlValueList
    assert !ref.valueList;
    return getTypeInfo(ref.type);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:Model.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java SqlDialect类代码示例发布时间:2022-05-23
下一篇:
Java PartMap类代码示例发布时间: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