public enum Visibility extends Enum<Visibility> implements ModifierContributor.ForType, ModifierContributor.ForMethod, ModifierContributor.ForField
ModifierContributor.ForField, ModifierContributor.ForMethod, ModifierContributor.ForType
Enum Constant and Description |
---|
PACKAGE_PRIVATE
Modifier for a package-private visibility.
|
PRIVATE
A modifier contributor for
private visibility. |
PROTECTED
A modifier contributor for
protected visibility. |
PUBLIC
A modifier contributor for
public visibility. |
EMPTY_MASK
Modifier and Type | Method and Description |
---|---|
int |
getMask()
Returns the mask of this modifier.
|
boolean |
isPackagePrivate()
Returns
true if this instance describes package-private visibility. |
boolean |
isPrivate()
Returns
true if this instance describes private visibility. |
boolean |
isProtected()
Returns
true if this instance describes protected visibility. |
boolean |
isPublic()
Returns
true if this instance describes public visibility. |
static Visibility |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Visibility[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Visibility PUBLIC
public
visibility.public static final Visibility PACKAGE_PRIVATE
public static final Visibility PROTECTED
protected
visibility.public static final Visibility PRIVATE
private
visibility.public static Visibility[] values()
for (Visibility c : Visibility.values()) System.out.println(c);
public static Visibility valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getMask()
ModifierContributor
getMask
in interface ModifierContributor
public boolean isPublic()
true
if this instance describes public
visibility.true
if this instance describes public
visibility.public boolean isProtected()
true
if this instance describes protected
visibility.true
if this instance describes protected
visibility.public boolean isPackagePrivate()
true
if this instance describes package-private visibility.true
if this instance describes package-private visibility.public boolean isPrivate()
true
if this instance describes private
visibility.true
if this instance describes private
visibility.Copyright © 2014. All rights reserved.