Java Code Examples for com.sun.tools.internal.xjc.model.CPropertyInfo#getExpectedMimeType()
The following examples show how to use
com.sun.tools.internal.xjc.model.CPropertyInfo#getExpectedMimeType() .
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 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 2
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 3
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 4
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 5
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 6
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 7
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 8
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()); } }