jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
240 public final boolean fastBoot; |
240 public final boolean fastBoot; |
241 |
241 |
242 private Set<XmlNs> xmlNsSet = null; |
242 private Set<XmlNs> xmlNsSet = null; |
243 |
243 |
244 /** |
244 /** |
|
245 * If true, despite the specification, unmarshall child element with parent namespace, if child namespace is not specified. |
|
246 * The default value is null for System {code}com.sun.xml.internal.bind.backupWithParentNamespace{code} property to be used, |
|
247 * and false is assumed if it's not set either. |
|
248 * |
|
249 * Boolean |
|
250 * @since 2.3.0 |
|
251 */ |
|
252 public Boolean backupWithParentNamespace = null; |
|
253 |
|
254 /** |
245 * Returns declared XmlNs annotations (from package-level annotation XmlSchema |
255 * Returns declared XmlNs annotations (from package-level annotation XmlSchema |
246 * |
256 * |
247 * @return set of all present XmlNs annotations |
257 * @return set of all present XmlNs annotations |
248 */ |
258 */ |
249 public Set<XmlNs> getXmlNsSet() { |
259 public Set<XmlNs> getXmlNsSet() { |
261 this.xmlAccessorFactorySupport = builder.xmlAccessorFactorySupport; |
271 this.xmlAccessorFactorySupport = builder.xmlAccessorFactorySupport; |
262 this.allNillable = builder.allNillable; |
272 this.allNillable = builder.allNillable; |
263 this.supressAccessorWarnings = builder.supressAccessorWarnings; |
273 this.supressAccessorWarnings = builder.supressAccessorWarnings; |
264 this.improvedXsiTypeHandling = builder.improvedXsiTypeHandling; |
274 this.improvedXsiTypeHandling = builder.improvedXsiTypeHandling; |
265 this.disableSecurityProcessing = builder.disableSecurityProcessing; |
275 this.disableSecurityProcessing = builder.disableSecurityProcessing; |
|
276 this.backupWithParentNamespace = builder.backupWithParentNamespace; |
266 |
277 |
267 Collection<TypeReference> typeRefs = builder.typeRefs; |
278 Collection<TypeReference> typeRefs = builder.typeRefs; |
268 |
279 |
269 boolean fastB; |
280 boolean fastB; |
270 try { |
281 try { |
1022 private Collection<TypeReference> typeRefs; |
1033 private Collection<TypeReference> typeRefs; |
1023 private boolean xmlAccessorFactorySupport = false; |
1034 private boolean xmlAccessorFactorySupport = false; |
1024 private boolean allNillable; |
1035 private boolean allNillable; |
1025 private boolean improvedXsiTypeHandling = true; |
1036 private boolean improvedXsiTypeHandling = true; |
1026 private boolean disableSecurityProcessing = true; |
1037 private boolean disableSecurityProcessing = true; |
|
1038 private Boolean backupWithParentNamespace = null; // null for System property to be used |
1027 |
1039 |
1028 public JAXBContextBuilder() {}; |
1040 public JAXBContextBuilder() {}; |
1029 |
1041 |
1030 public JAXBContextBuilder(JAXBContextImpl baseImpl) { |
1042 public JAXBContextBuilder(JAXBContextImpl baseImpl) { |
1031 this.supressAccessorWarnings = baseImpl.supressAccessorWarnings; |
1043 this.supressAccessorWarnings = baseImpl.supressAccessorWarnings; |
1037 this.classes = baseImpl.classes; |
1049 this.classes = baseImpl.classes; |
1038 this.typeRefs = baseImpl.bridges.keySet(); |
1050 this.typeRefs = baseImpl.bridges.keySet(); |
1039 this.xmlAccessorFactorySupport = baseImpl.xmlAccessorFactorySupport; |
1051 this.xmlAccessorFactorySupport = baseImpl.xmlAccessorFactorySupport; |
1040 this.allNillable = baseImpl.allNillable; |
1052 this.allNillable = baseImpl.allNillable; |
1041 this.disableSecurityProcessing = baseImpl.disableSecurityProcessing; |
1053 this.disableSecurityProcessing = baseImpl.disableSecurityProcessing; |
|
1054 this.backupWithParentNamespace = baseImpl.backupWithParentNamespace; |
1042 } |
1055 } |
1043 |
1056 |
1044 public JAXBContextBuilder setRetainPropertyInfo(boolean val) { |
1057 public JAXBContextBuilder setRetainPropertyInfo(boolean val) { |
1045 this.retainPropertyInfo = val; |
1058 this.retainPropertyInfo = val; |
1046 return this; |
1059 return this; |
1096 return this; |
1109 return this; |
1097 } |
1110 } |
1098 |
1111 |
1099 public JAXBContextBuilder setDisableSecurityProcessing(boolean val) { |
1112 public JAXBContextBuilder setDisableSecurityProcessing(boolean val) { |
1100 this.disableSecurityProcessing = val; |
1113 this.disableSecurityProcessing = val; |
|
1114 return this; |
|
1115 } |
|
1116 |
|
1117 public JAXBContextBuilder setBackupWithParentNamespace(Boolean backupWithParentNamespace) { |
|
1118 this.backupWithParentNamespace = backupWithParentNamespace; |
1101 return this; |
1119 return this; |
1102 } |
1120 } |
1103 |
1121 |
1104 public JAXBContextImpl build() throws JAXBException { |
1122 public JAXBContextImpl build() throws JAXBException { |
1105 |
1123 |