Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/javax/xml/bind/marshal/8036981/Good.java
38862 views
/*1* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223package testjaxbcontext;2425import org.w3c.dom.Element;26import javax.xml.bind.annotation.XmlAccessType;27import javax.xml.bind.annotation.XmlAccessorType;28import javax.xml.bind.annotation.XmlAnyElement;29import javax.xml.bind.annotation.XmlType;30import java.util.ArrayList;31import java.util.List;3233/**34* <p>35* Java class for Good complex type.36*37* <p>38* The following schema fragment specifies the expected content contained within39* this class.40*41* <pre>42* <complexType name="Good">43* <complexContent>44* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">45* <sequence>46* <any processContents='skip' maxOccurs="70"/>47* </sequence>48* </restriction>49* </complexContent>50* </complexType>51* </pre>52*53*54*/55@XmlAccessorType(XmlAccessType.FIELD)56@XmlType(name = "Good", propOrder = {57"any"58})59public class Good {6061@XmlAnyElement62protected List<Element> any;6364/**65* Gets the value of the any property.66*67* <p>68* This accessor method returns a reference to the live list, not a69* snapshot. Therefore any modification you make to the returned list will70* be present inside the JAXB object. This is why there is not a71* <CODE>set</CODE> method for the any property.72*73* <p>74* For example, to add a new item, do as follows:75* <pre>76* getAny().add(newItem);77* </pre>78*79*80* <p>81* Objects of the following type(s) are allowed in the list82* {@link org.w3c.dom.Element }83*84*85*/86public List<Element> getAny() {87if (any == null) {88any = new ArrayList<Element>();89}90return this.any;91}9293}949596