src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DomLoader.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -97,14 +97,14 @@
     }
 
     @Override
     public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
         UnmarshallingContext context = state.getContext();
-        if (state.target == null)
-            state.target = new State(context);
+        if (state.getTarget() == null)
+            state.setTarget(new State(context));
 
-        State s = (State) state.target;
+        State s = (State) state.getTarget();
         try {
             s.declarePrefixes(context, context.getNewlyDeclaredPrefixes());
             s.handler.startElement(ea.uri, ea.local, ea.getQname(), ea.atts);
         } catch (SAXException e) {
             context.handleError(e);

@@ -112,32 +112,32 @@
         }
     }
 
     @Override
     public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
-        state.loader = this;
-        State s = (State) state.prev.target;
+        state.setLoader(this);
+        State s = (State) state.getPrev().getTarget();
         s.depth++;
-        state.target = s;
+        state.setTarget(s);
     }
 
     @Override
     public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
         if(text.length()==0)
             return;     // there's no point in creating an empty Text node in DOM.
         try {
-            State s = (State) state.target;
+            State s = (State) state.getTarget();
             s.handler.characters(text.toString().toCharArray(),0,text.length());
         } catch( SAXException e ) {
             state.getContext().handleError(e);
             throw e;
         }
     }
 
     @Override
     public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
-        State s = (State) state.target;
+        State s = (State) state.getTarget();
         UnmarshallingContext context = state.getContext();
 
         try {
             s.handler.endElement(ea.uri, ea.local, ea.getQname());
             s.undeclarePrefixes(context.getNewlyDeclaredPrefixes());

@@ -155,10 +155,10 @@
                 context.handleError(e);
                 throw e;
             }
 
             // we are done
-            state.target = s.getElement();
+            state.setTarget(s.getElement());
         }
     }
 
 }