spoon.reflect.declaration.ModifierKind Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spoon-core Show documentation
Show all versions of spoon-core Show documentation
Spoon is a tool for meta-programming, analysis and transformation of Java programs.
/*
* SPDX-License-Identifier: (MIT OR CECILL-C)
*
* Copyright (C) 2006-2023 INRIA and contributors
*
* Spoon is available either under the terms of the MIT License (see LICENSE-MIT.txt) or the Cecill-C License (see LICENSE-CECILL-C.txt). You as the user are entitled to choose the terms under which to adopt Spoon.
*/
package spoon.reflect.declaration;
/**
* Represents a modifier on the declaration of a program element such as a
* class, method, or field.
*
* The order is important, because it is always pretty--printed is this order, enabling to have a JLS-compliant,
* checkstyle compliant generated code (thanks to EnumSet used for modifiers).
*/
public enum ModifierKind {
/**
* The modifier public
*/
PUBLIC("public"),
/**
* The modifier protected
*/
PROTECTED("protected"),
/**
* The modifier private
*/
PRIVATE("private"),
/**
* The modifier abstract
*/
ABSTRACT("abstract"),
/**
* The modifier static
*/
STATIC("static"),
/**
* The modifier final
*/
FINAL("final"),
/**
* The modifier transient
*/
TRANSIENT("transient"),
/**
* The modifier volatile
*/
VOLATILE("volatile"),
/**
* The modifier synchronized
*/
SYNCHRONIZED("synchronized"),
/**
* The modifier native
*/
NATIVE("native"),
/**
* The modifier strictfp
*/
STRICTFP("strictfp"),
/**
* The modifier non-sealed
*/
NON_SEALED("non-sealed"),
/**
* The modifier sealed
*/
SEALED("sealed");
ModifierKind(String lowercase) {
this.lowercase = lowercase;
}
private final String lowercase; // modifier name in lowercase
/**
* Returns this modifier's name in lowercase.
*/
@Override
public String toString() {
return lowercase;
}
}