com.sun.tools.internal.xjc.api.Reference Java Examples
The following examples show how to use
com.sun.tools.internal.xjc.api.Reference.
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 openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() { if(xsdgen==null) { xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types); for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) { Reference value = e.getValue(); if(value!=null) { NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value); if(typeInfo==null) throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind"); TypeMirror type = value.type; xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo); } else { xsdgen.add(e.getKey(),false,null); } } } return xsdgen; }
Example #2
Source File: JAXBModelImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() { if(xsdgen==null) { xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types); for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) { Reference value = e.getValue(); if(value!=null) { NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value); if(typeInfo==null) throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind"); TypeMirror type = value.type; xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo); } else { xsdgen.add(e.getKey(),false,null); } } } return xsdgen; }
Example #3
Source File: JAXBModelImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() { if(xsdgen==null) { xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types); for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) { Reference value = e.getValue(); if(value!=null) { NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value); if(typeInfo==null) throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind"); TypeMirror type = value.type; xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo); } else { xsdgen.add(e.getKey(),false,null); } } } return xsdgen; }
Example #4
Source File: JAXBModelImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() { if(xsdgen==null) { xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types); for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) { Reference value = e.getValue(); if(value!=null) { NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value); if(typeInfo==null) throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind"); TypeMirror type = value.type; xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo); } else { xsdgen.add(e.getKey(),false,null); } } } return xsdgen; }
Example #5
Source File: JAXBModelImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() { if(xsdgen==null) { xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types); for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) { Reference value = e.getValue(); if(value!=null) { NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value); if(typeInfo==null) throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind"); TypeMirror type = value.type; xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo); } else { xsdgen.add(e.getKey(),false,null); } } } return xsdgen; }
Example #6
Source File: JAXBModelImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() { if(xsdgen==null) { xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types); for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) { Reference value = e.getValue(); if(value!=null) { NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value); if(typeInfo==null) throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind"); TypeMirror type = value.type; xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo); } else { xsdgen.add(e.getKey(),false,null); } } } return xsdgen; }
Example #7
Source File: JAXBModelImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() { if(xsdgen==null) { xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types); for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) { Reference value = e.getValue(); if(value!=null) { NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value); if(typeInfo==null) throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind"); TypeMirror type = value.type; xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo); } else { xsdgen.add(e.getKey(),false,null); } } } return xsdgen; }
Example #8
Source File: JAXBModelImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() { if(xsdgen==null) { xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types); for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) { Reference value = e.getValue(); if(value!=null) { NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value); if(typeInfo==null) throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind"); TypeMirror type = value.type; xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo); } else { xsdgen.add(e.getKey(),false,null); } } } return xsdgen; }
Example #9
Source File: SchemaGenerator.java From hottub with GNU General Public License v2.0 | 5 votes |
private void filterClass(List<Reference> classes, Collection<? extends Element> elements) { for (Element element : elements) { if (element.getKind().equals(ElementKind.CLASS) || element.getKind().equals(ElementKind.ENUM)) { classes.add(new Reference((TypeElement) element, processingEnv)); filterClass(classes, ElementFilter.typesIn(element.getEnclosedElements())); } } }
Example #10
Source File: SchemaGenerator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private void filterClass(List<Reference> classes, Collection<? extends Element> elements) { for (Element element : elements) { if (element.getKind().equals(ElementKind.CLASS) || element.getKind().equals(ElementKind.ENUM)) { classes.add(new Reference((TypeElement) element, processingEnv)); filterClass(classes, ElementFilter.typesIn(element.getEnclosedElements())); } } }
Example #11
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 #12
Source File: JAXBModelImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public QName getXmlTypeName(Reference javaType) { NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType); if(ti!=null) return ti.getTypeName(); return null; }
Example #13
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 #14
Source File: SchemaGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Filter classes (note that enum is kind of class) from elements tree * @param result list of found classes * @param elements tree to be filtered */ private void filterClass(List<Reference> result, Collection<? extends Element> elements) { for (Element element : elements) { final ElementKind kind = element.getKind(); if (ElementKind.CLASS.equals(kind) || ElementKind.ENUM.equals(kind)) { result.add(new Reference((TypeElement) element, processingEnv)); filterClass(result, ElementFilter.typesIn(element.getEnclosedElements())); } } }
Example #15
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 #16
Source File: JAXBModelImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
public QName getXmlTypeName(Reference javaType) { NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType); if(ti!=null) return ti.getTypeName(); return null; }
Example #17
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 #18
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 #19
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 #20
Source File: JAXBModelImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public QName getXmlTypeName(Reference javaType) { NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType); if(ti!=null) return ti.getTypeName(); return null; }
Example #21
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 #22
Source File: SchemaGenerator.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private void filterClass(List<Reference> classes, Collection<? extends Element> elements) { for (Element element : elements) { if (element.getKind().equals(ElementKind.CLASS)) { classes.add(new Reference((TypeElement) element, processingEnv)); filterClass(classes, ElementFilter.typesIn(element.getEnclosedElements())); } } }
Example #23
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 #24
Source File: JAXBModelImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public QName getXmlTypeName(Reference javaType) { NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType); if(ti!=null) return ti.getTypeName(); return null; }
Example #25
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 #26
Source File: SchemaGenerator.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private void filterClass(List<Reference> classes, Collection<? extends Element> elements) { for (Element element : elements) { if (element.getKind().equals(ElementKind.CLASS)) { classes.add(new Reference((TypeElement) element, processingEnv)); filterClass(classes, ElementFilter.typesIn(element.getEnclosedElements())); } } }
Example #27
Source File: JAXBModelImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public QName getXmlTypeName(Reference javaType) { NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType); if(ti!=null) return ti.getTypeName(); return null; }
Example #28
Source File: JAXBModelImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public QName getXmlTypeName(Reference javaType) { NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType); if(ti!=null) return ti.getTypeName(); return null; }
Example #29
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 #30
Source File: SchemaGenerator.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private void filterClass(List<Reference> classes, Collection<? extends Element> elements) { for (Element element : elements) { if (element.getKind().equals(ElementKind.CLASS) || element.getKind().equals(ElementKind.ENUM)) { classes.add(new Reference((TypeElement) element, processingEnv)); filterClass(classes, ElementFilter.typesIn(element.getEnclosedElements())); } } }