Path: blob/aarch64-shenandoah-jdk8u272-b10/langtools/src/share/classes/javax/lang/model/element/Modifier.java
38899 views
/*1* Copyright (c) 2005, 2013, 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. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.lang.model.element;262728/**29* Represents a modifier on a program element such30* as a class, method, or field.31*32* <p>Not all modifiers are applicable to all kinds of elements.33* When two or more modifiers appear in the source code of an element34* then it is customary, though not required, that they appear in the same35* order as the constants listed in the detail section below.36*37* <p>Note that it is possible additional modifiers will be added in38* future versions of the platform.39*40* @author Joseph D. Darcy41* @author Scott Seligman42* @author Peter von der Ahé43* @since 1.644*/4546public enum Modifier {4748// See JLS sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, and 9.1.1.49// java.lang.reflect.Modifier includes INTERFACE, but that's a VMism.5051/** The modifier {@code public} */ PUBLIC,52/** The modifier {@code protected} */ PROTECTED,53/** The modifier {@code private} */ PRIVATE,54/** The modifier {@code abstract} */ ABSTRACT,55/**56* The modifier {@code default}57* @since 1.858*/59DEFAULT,60/** The modifier {@code static} */ STATIC,61/** The modifier {@code final} */ FINAL,62/** The modifier {@code transient} */ TRANSIENT,63/** The modifier {@code volatile} */ VOLATILE,64/** The modifier {@code synchronized} */ SYNCHRONIZED,65/** The modifier {@code native} */ NATIVE,66/** The modifier {@code strictfp} */ STRICTFP;6768/**69* Returns this modifier's name in lowercase.70*/71public String toString() {72return name().toLowerCase(java.util.Locale.US);73}74}757677