Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package org.glassfish.jaxb.runtime.v2.runtime.unmarshaller;
import org.glassfish.jaxb.core.Utils;
import org.glassfish.jaxb.runtime.api.AccessorException;
import org.glassfish.jaxb.runtime.api.JAXBRIContext;
import org.glassfish.jaxb.core.v2.WellKnownNamespace;
import org.glassfish.jaxb.runtime.v2.runtime.ClassBeanInfoImpl;
import org.glassfish.jaxb.runtime.v2.runtime.JAXBContextImpl;
import org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo;
import org.glassfish.jaxb.runtime.v2.runtime.property.AttributeProperty;
import org.glassfish.jaxb.runtime.v2.runtime.property.Property;
import org.glassfish.jaxb.runtime.v2.runtime.property.StructureLoaderBuilder;
import org.glassfish.jaxb.runtime.v2.runtime.property.UnmarshallerChain;
import org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor;
import org.glassfish.jaxb.runtime.v2.runtime.reflect.TransducedAccessor;
import org.glassfish.jaxb.runtime.v2.util.QNameMap;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import javax.xml.namespace.QName;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
* Loads children of an element.
*
*
* This loader works with a single {@link JaxBeanInfo} and handles
* attributes, child elements, or child text.
*
* @author Kohsuke Kawaguchi
*/
public final class StructureLoader extends Loader {
/**
* This map statically stores information of the
* unmarshaller loader and can be used while unmarshalling
* Since creating new QNames is expensive use this optimized
* version of the map
*/
private final QNameMap childUnmarshallers = new QNameMap();
/**
* Loader that processes elements that didn't match anf of the {@link #childUnmarshallers}.
* Can be null.
*/
private /*final*/ ChildLoader catchAll;
/**
* If we have a loader for processing text. Otherwise null.
*/
private /*final*/ ChildLoader textHandler;
/**
* Unmarshallers for attribute values.
* May be null if no attribute is expected and {@link #attCatchAll}==null.
*/
private /*final*/ QNameMap attUnmarshallers;
/**
* This will receive all the attributes
* that were not processed. Never be null.
*/
private /*final*/ Accessor