本文整理汇总了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;未经允许,请勿转载。 |
请发表评论