javax.xml.bind.annotation.XmlIDREF Java Examples
The following examples show how to use
javax.xml.bind.annotation.XmlIDREF.
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: BeanGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary. * Also generates other per-property annotations * (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary. */ public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) { CAdapter adapter = prop.getAdapter(); if (adapter != null) { if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) { field.annotate(XmlAttachmentRef.class); } else { // [RESULT] // @XmlJavaTypeAdapter( Foo.class ) XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class); xjtw.value(adapter.adapterType.toType(this, EXPOSED)); } } switch (prop.id()) { case ID: field.annotate(XmlID.class); break; case IDREF: field.annotate(XmlIDREF.class); break; } if (prop.getExpectedMimeType() != null) { field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString()); } }
Example #2
Source File: BeanGenerator.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary. * Also generates other per-property annotations * (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary. */ public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) { CAdapter adapter = prop.getAdapter(); if (adapter != null) { if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) { field.annotate(XmlAttachmentRef.class); } else { // [RESULT] // @XmlJavaTypeAdapter( Foo.class ) XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class); xjtw.value(adapter.adapterType.toType(this, EXPOSED)); } } switch (prop.id()) { case ID: field.annotate(XmlID.class); break; case IDREF: field.annotate(XmlIDREF.class); break; } if (prop.getExpectedMimeType() != null) { field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString()); } }
Example #3
Source File: PropertyInfoImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private ID calcId() { if(seed.hasAnnotation(XmlID.class)) { // check the type if(!nav().isSameType(getIndividualType(), nav().ref(String.class))) parent.builder.reportError(new IllegalAnnotationException( Messages.ID_MUST_BE_STRING.format(getName()), seed ) ); return ID.ID; } else if(seed.hasAnnotation(XmlIDREF.class)) { return ID.IDREF; } else { return ID.NONE; } }
Example #4
Source File: ElementInfoImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private ID calcId() { // TODO: share code with PropertyInfoImpl if(reader().hasMethodAnnotation(XmlID.class,method)) { return ID.ID; } else if(reader().hasMethodAnnotation(XmlIDREF.class,method)) { return ID.IDREF; } else { return ID.NONE; } }
Example #5
Source File: BeanGenerator.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary. * Also generates other per-property annotations * (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary. */ public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) { CAdapter adapter = prop.getAdapter(); if (adapter != null) { if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) { field.annotate(XmlAttachmentRef.class); } else { // [RESULT] // @XmlJavaTypeAdapter( Foo.class ) XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class); xjtw.value(adapter.adapterType.toType(this, EXPOSED)); } } switch (prop.id()) { case ID: field.annotate(XmlID.class); break; case IDREF: field.annotate(XmlIDREF.class); break; } if (prop.getExpectedMimeType() != null) { field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString()); } }
Example #6
Source File: PropertyInfoImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private ID calcId() { if(seed.hasAnnotation(XmlID.class)) { // check the type if(!nav().isSameType(getIndividualType(), nav().ref(String.class))) parent.builder.reportError(new IllegalAnnotationException( Messages.ID_MUST_BE_STRING.format(getName()), seed ) ); return ID.ID; } else if(seed.hasAnnotation(XmlIDREF.class)) { return ID.IDREF; } else { return ID.NONE; } }
Example #7
Source File: ElementInfoImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private ID calcId() { // TODO: share code with PropertyInfoImpl if(reader().hasMethodAnnotation(XmlID.class,method)) { return ID.ID; } else if(reader().hasMethodAnnotation(XmlIDREF.class,method)) { return ID.IDREF; } else { return ID.NONE; } }
Example #8
Source File: BeanGenerator.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary. * Also generates other per-property annotations * (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary. */ public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) { CAdapter adapter = prop.getAdapter(); if (adapter != null) { if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) { field.annotate(XmlAttachmentRef.class); } else { // [RESULT] // @XmlJavaTypeAdapter( Foo.class ) XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class); xjtw.value(adapter.adapterType.toType(this, EXPOSED)); } } switch (prop.id()) { case ID: field.annotate(XmlID.class); break; case IDREF: field.annotate(XmlIDREF.class); break; } if (prop.getExpectedMimeType() != null) { field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString()); } }
Example #9
Source File: PropertyInfoImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
private ID calcId() { if(seed.hasAnnotation(XmlID.class)) { // check the type if(!nav().isSameType(getIndividualType(), nav().ref(String.class))) parent.builder.reportError(new IllegalAnnotationException( Messages.ID_MUST_BE_STRING.format(getName()), seed ) ); return ID.ID; } else if(seed.hasAnnotation(XmlIDREF.class)) { return ID.IDREF; } else { return ID.NONE; } }
Example #10
Source File: ElementInfoImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
private ID calcId() { // TODO: share code with PropertyInfoImpl if(reader().hasMethodAnnotation(XmlID.class,method)) { return ID.ID; } else if(reader().hasMethodAnnotation(XmlIDREF.class,method)) { return ID.IDREF; } else { return ID.NONE; } }
Example #11
Source File: PropertyInfoImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private ID calcId() { if(seed.hasAnnotation(XmlID.class)) { // check the type if(!nav().isSameType(getIndividualType(), nav().ref(String.class))) parent.builder.reportError(new IllegalAnnotationException( Messages.ID_MUST_BE_STRING.format(getName()), seed ) ); return ID.ID; } else if(seed.hasAnnotation(XmlIDREF.class)) { return ID.IDREF; } else { return ID.NONE; } }
Example #12
Source File: ElementInfoImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private ID calcId() { // TODO: share code with PropertyInfoImpl if(reader().hasMethodAnnotation(XmlID.class,method)) { return ID.ID; } else if(reader().hasMethodAnnotation(XmlIDREF.class,method)) { return ID.IDREF; } else { return ID.NONE; } }
Example #13
Source File: ElementInfoImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private ID calcId() { // TODO: share code with PropertyInfoImpl if(reader().hasMethodAnnotation(XmlID.class,method)) { return ID.ID; } else if(reader().hasMethodAnnotation(XmlIDREF.class,method)) { return ID.IDREF; } else { return ID.NONE; } }
Example #14
Source File: BeanGenerator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary. * Also generates other per-property annotations * (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary. */ public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) { CAdapter adapter = prop.getAdapter(); if (adapter != null) { if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) { field.annotate(XmlAttachmentRef.class); } else { // [RESULT] // @XmlJavaTypeAdapter( Foo.class ) XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class); xjtw.value(adapter.adapterType.toType(this, EXPOSED)); } } switch (prop.id()) { case ID: field.annotate(XmlID.class); break; case IDREF: field.annotate(XmlIDREF.class); break; } if (prop.getExpectedMimeType() != null) { field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString()); } }
Example #15
Source File: PropertyInfoImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private ID calcId() { if(seed.hasAnnotation(XmlID.class)) { // check the type if(!nav().isSameType(getIndividualType(), nav().ref(String.class))) parent.builder.reportError(new IllegalAnnotationException( Messages.ID_MUST_BE_STRING.format(getName()), seed ) ); return ID.ID; } else if(seed.hasAnnotation(XmlIDREF.class)) { return ID.IDREF; } else { return ID.NONE; } }
Example #16
Source File: ElementInfoImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private ID calcId() { // TODO: share code with PropertyInfoImpl if(reader().hasMethodAnnotation(XmlID.class,method)) { return ID.ID; } else if(reader().hasMethodAnnotation(XmlIDREF.class,method)) { return ID.IDREF; } else { return ID.NONE; } }
Example #17
Source File: BeanGenerator.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary. * Also generates other per-property annotations * (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary. */ public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) { CAdapter adapter = prop.getAdapter(); if (adapter != null) { if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) { field.annotate(XmlAttachmentRef.class); } else { // [RESULT] // @XmlJavaTypeAdapter( Foo.class ) XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class); xjtw.value(adapter.adapterType.toType(this, EXPOSED)); } } switch (prop.id()) { case ID: field.annotate(XmlID.class); break; case IDREF: field.annotate(XmlIDREF.class); break; } if (prop.getExpectedMimeType() != null) { field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString()); } }
Example #18
Source File: PropertyInfoImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private ID calcId() { if(seed.hasAnnotation(XmlID.class)) { // check the type if(!nav().isSameType(getIndividualType(), nav().ref(String.class))) parent.builder.reportError(new IllegalAnnotationException( Messages.ID_MUST_BE_STRING.format(getName()), seed ) ); return ID.ID; } else if(seed.hasAnnotation(XmlIDREF.class)) { return ID.IDREF; } else { return ID.NONE; } }
Example #19
Source File: ElementInfoImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private ID calcId() { // TODO: share code with PropertyInfoImpl if(reader().hasMethodAnnotation(XmlID.class,method)) { return ID.ID; } else if(reader().hasMethodAnnotation(XmlIDREF.class,method)) { return ID.IDREF; } else { return ID.NONE; } }
Example #20
Source File: BeanGenerator.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary. * Also generates other per-property annotations * (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary. */ public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) { CAdapter adapter = prop.getAdapter(); if (adapter != null) { if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) { field.annotate(XmlAttachmentRef.class); } else { // [RESULT] // @XmlJavaTypeAdapter( Foo.class ) XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class); xjtw.value(adapter.adapterType.toType(this, EXPOSED)); } } switch (prop.id()) { case ID: field.annotate(XmlID.class); break; case IDREF: field.annotate(XmlIDREF.class); break; } if (prop.getExpectedMimeType() != null) { field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString()); } }
Example #21
Source File: PropertyInfoImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private ID calcId() { if(seed.hasAnnotation(XmlID.class)) { // check the type if(!nav().isSameType(getIndividualType(), nav().ref(String.class))) parent.builder.reportError(new IllegalAnnotationException( Messages.ID_MUST_BE_STRING.format(getName()), seed ) ); return ID.ID; } else if(seed.hasAnnotation(XmlIDREF.class)) { return ID.IDREF; } else { return ID.NONE; } }
Example #22
Source File: ElementInfoImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private ID calcId() { // TODO: share code with PropertyInfoImpl if(reader().hasMethodAnnotation(XmlID.class,method)) { return ID.ID; } else if(reader().hasMethodAnnotation(XmlIDREF.class,method)) { return ID.IDREF; } else { return ID.NONE; } }
Example #23
Source File: BeanGenerator.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary. * Also generates other per-property annotations * (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary. */ public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) { CAdapter adapter = prop.getAdapter(); if (adapter != null) { if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) { field.annotate(XmlAttachmentRef.class); } else { // [RESULT] // @XmlJavaTypeAdapter( Foo.class ) XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class); xjtw.value(adapter.adapterType.toType(this, EXPOSED)); } } switch (prop.id()) { case ID: field.annotate(XmlID.class); break; case IDREF: field.annotate(XmlIDREF.class); break; } if (prop.getExpectedMimeType() != null) { field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString()); } }
Example #24
Source File: PropertyInfoImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private ID calcId() { if(seed.hasAnnotation(XmlID.class)) { // check the type if(!nav().isSameType(getIndividualType(), nav().ref(String.class))) parent.builder.reportError(new IllegalAnnotationException( Messages.ID_MUST_BE_STRING.format(getName()), seed ) ); return ID.ID; } else if(seed.hasAnnotation(XmlIDREF.class)) { return ID.IDREF; } else { return ID.NONE; } }