1 /* |
1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, 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 |
170 if(child == null) |
170 if(child == null) |
171 child = context.createInstance(beanInfo); |
171 child = context.createInstance(beanInfo); |
172 |
172 |
173 context.recordInnerPeer(child); |
173 context.recordInnerPeer(child); |
174 |
174 |
175 state.target = child; |
175 state.setTarget(child); |
176 |
176 |
177 fireBeforeUnmarshal(beanInfo, child, state); |
177 fireBeforeUnmarshal(beanInfo, child, state); |
178 |
178 |
179 |
179 |
180 context.startScope(frameSize); |
180 context.startScope(frameSize); |
195 xacc.parse(child,avalue); |
195 xacc.parse(child,avalue); |
196 } else if (attCatchAll!=null) { |
196 } else if (attCatchAll!=null) { |
197 String qname = atts.getQName(i); |
197 String qname = atts.getQName(i); |
198 if(atts.getURI(i).equals(WellKnownNamespace.XML_SCHEMA_INSTANCE)) |
198 if(atts.getURI(i).equals(WellKnownNamespace.XML_SCHEMA_INSTANCE)) |
199 continue; // xsi:* attributes are meant to be processed by us, not by user apps. |
199 continue; // xsi:* attributes are meant to be processed by us, not by user apps. |
200 Object o = state.target; |
200 Object o = state.getTarget(); |
201 Map<QName,String> map = attCatchAll.get(o); |
201 Map<QName,String> map = attCatchAll.get(o); |
202 if(map==null) { |
202 if(map==null) { |
203 // TODO: use ClassFactory.inferImplClass(sig,knownImplClasses) |
203 // TODO: use ClassFactory.inferImplClass(sig,knownImplClasses) |
204 |
204 |
205 // if null, create a new map. |
205 // if null, create a new map. |
271 } |
271 } |
272 |
272 |
273 @Override |
273 @Override |
274 public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException { |
274 public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException { |
275 state.getContext().endScope(frameSize); |
275 state.getContext().endScope(frameSize); |
276 fireAfterUnmarshal(beanInfo, state.target, state.prev); |
276 fireAfterUnmarshal(beanInfo, state.getTarget(), state.getPrev()); |
277 } |
277 } |
278 |
278 |
279 private static final QNameMap<TransducedAccessor> EMPTY = new QNameMap<TransducedAccessor>(); |
279 private static final QNameMap<TransducedAccessor> EMPTY = new QNameMap<TransducedAccessor>(); |
280 |
280 |
281 public JaxBeanInfo getBeanInfo() { |
281 public JaxBeanInfo getBeanInfo() { |