com.sun.xml.internal.bind.v2.model.core.Ref Java Examples
The following examples show how to use
com.sun.xml.internal.bind.v2.model.core.Ref.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JAXBModelImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
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); }
Example #2
Source File: JAXBModelImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
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); }
Example #3
Source File: JavaCompilerImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
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)); }
Example #4
Source File: JAXBModelImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
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); }
Example #5
Source File: TypeInfoSetImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #6
Source File: ModelBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #7
Source File: JAXBContextImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
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); }
Example #8
Source File: TypeInfoSetImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #9
Source File: ModelBuilder.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #10
Source File: JAXBContextImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
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); }
Example #11
Source File: JavaCompilerImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
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)); }
Example #12
Source File: ModelBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #13
Source File: TypeInfoSetImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #14
Source File: ModelBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #15
Source File: JAXBContextImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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); }
Example #16
Source File: JavaCompilerImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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)); }
Example #17
Source File: JAXBModelImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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); }
Example #18
Source File: TypeInfoSetImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #19
Source File: ModelBuilder.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #20
Source File: JAXBContextImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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); }
Example #21
Source File: JavaCompilerImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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)); }
Example #22
Source File: JAXBModelImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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); }
Example #23
Source File: JAXBModelImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
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); }
Example #24
Source File: TypeInfoSetImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #25
Source File: JAXBContextImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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); }
Example #26
Source File: JavaCompilerImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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)); }
Example #27
Source File: JAXBModelImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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); }
Example #28
Source File: TypeInfoSetImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #29
Source File: ModelBuilder.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #30
Source File: JAXBContextImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
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); }