jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Scope.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2012, 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 |
95 * Adds a new item to this packing scope. |
95 * Adds a new item to this packing scope. |
96 */ |
96 */ |
97 public void add( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister, ItemT value) throws SAXException{ |
97 public void add( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister, ItemT value) throws SAXException{ |
98 try { |
98 try { |
99 if(!hasStarted()) { |
99 if(!hasStarted()) { |
100 this.bean = (BeanT)context.getCurrentState().target; |
100 this.bean = (BeanT)context.getCurrentState().getTarget(); |
101 this.acc = acc; |
101 this.acc = acc; |
102 this.lister = lister; |
102 this.lister = lister; |
103 this.pack = lister.startPacking(bean,acc); |
103 this.pack = lister.startPacking(bean,acc); |
104 } |
104 } |
105 |
105 |
119 * to distinguish empty array vs null array. |
119 * to distinguish empty array vs null array. |
120 */ |
120 */ |
121 public void start( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister) throws SAXException{ |
121 public void start( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister) throws SAXException{ |
122 try { |
122 try { |
123 if(!hasStarted()) { |
123 if(!hasStarted()) { |
124 this.bean = (BeanT)context.getCurrentState().target; |
124 this.bean = (BeanT)context.getCurrentState().getTarget(); |
125 this.acc = acc; |
125 this.acc = acc; |
126 this.lister = lister; |
126 this.lister = lister; |
127 this.pack = lister.startPacking(bean,acc); |
127 this.pack = lister.startPacking(bean,acc); |
128 } |
128 } |
129 } catch (AccessorException e) { |
129 } catch (AccessorException e) { |