Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/javax/xml/bind/marshal/8036981/Root.java
38861 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 javax.xml.bind.annotation.*;26import java.util.ArrayList;27import java.util.List;2829/**30* <p>31* Java class for Root complex type.32*33* <p>34* The following schema fragment specifies the expected content contained within35* this class.36*37* <pre>38* <complexType name="Root">39* <complexContent>40* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">41* <sequence>42* <any processContents='skip' maxOccurs="70"/>43* </sequence>44* </restriction>45* </complexContent>46* </complexType>47* </pre>48*49*50*/51@XmlAccessorType(XmlAccessType.FIELD)52@XmlType(name = "Root", propOrder = {53"content"54})55public class Root {5657@XmlMixed58@XmlAnyElement59protected List<Object> content;6061/**62* Gets the value of the content property.63*64* <p>65* This accessor method returns a reference to the live list, not a66* snapshot. Therefore any modification you make to the returned list will67* be present inside the JAXB object. This is why there is not a68* <CODE>set</CODE> method for the content property.69*70* <p>71* For example, to add a new item, do as follows:72* <pre>73* getContent().add(newItem);74* </pre>75*76*77* <p>78* Objects of the following type(s) are allowed in the list {@link org.w3c.dom.Element }79* {@link String }80*81*82*/83public List<Object> getContent() {84if (content == null) {85content = new ArrayList<Object>();86}87return this.content;88}8990}919293