1 /*
2 * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved.
3 *
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Distribution License v. 1.0, which is available at
6 * http://www.eclipse.org/org/documents/edl-v10.php.
7 *
8 * SPDX-License-Identifier: BSD-3-Clause
9 */
10
11 package javax.xml.bind.annotation;
12
13
14
15 /**
16 * Used by XmlAccessorType to control serialization of fields or
17 * properties.
18 *
19 * @author Sekhar Vajjhala, Sun Microsystems, Inc.
20 * @since 1.6, JAXB 2.0
21 * @see XmlAccessorType
22 */
23
24 public enum XmlAccessType {
25 /**
26 * Every getter/setter pair in a JAXB-bound class will be automatically
27 * bound to XML, unless annotated by {@link XmlTransient}.
28 *
29 * Fields are bound to XML only when they are explicitly annotated
30 * by some of the JAXB annotations.
31 */
32 PROPERTY,
33 /**
34 * Every non static, non transient field in a JAXB-bound class will be automatically
35 * bound to XML, unless annotated by {@link XmlTransient}.
36 *
37 * Getter/setter pairs are bound to XML only when they are explicitly annotated
38 * by some of the JAXB annotations.
39 */
40 FIELD,
41 /**
42 * Every public getter/setter pair and every public field will be
43 * automatically bound to XML, unless annotated by {@link XmlTransient}.
44 *
45 * Fields or getter/setter pairs that are private, protected, or
46 * defaulted to package-only access are bound to XML only when they are
47 * explicitly annotated by the appropriate JAXB annotations.
48 */
49 PUBLIC_MEMBER,
50 /**
51 * None of the fields or properties is bound to XML unless they
52 * are specifically annotated with some of the JAXB annotations.
53 */
54 NONE
55 }
56
57