APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.javadoc.internal.tool

public final Enum AccessLevel

extends Enum<AccessLevel>
implements Comparable<AccessLevel>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
java.util.Set, javax.lang.model.element.Modifier

The access levels. These constants are ordered by their access limiting power. The bigger the ordinal of a constant, the more limiting power that constant has. That has a few useful implications. For example, the levels can be compared by compareTo. It also means that AccessLevel.values()[0] and {@code AccessLevel.values()[values.length() - 1] and the constants with the smallest and the biggest limiting powers respectively.

Field Summary

Modifier and TypeField and Description
public static final AccessLevel
PACKAGE

Limits access to entities that are public, protected, or declared with package access

public static final AccessLevel
PRIVATE

Does not limit access

public static final AccessLevel
PROTECTED

Limits access to public and protected entities

public static final AccessLevel
PUBLIC

Limits access to public entities

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static AccessLevel
of(Set<Modifier> mods)

public static AccessLevel
public static AccessLevel[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

PACKAGEback to summary
public static final AccessLevel PACKAGE

Limits access to entities that are public, protected, or declared with package access

PRIVATEback to summary
public static final AccessLevel PRIVATE

Does not limit access

PROTECTEDback to summary
public static final AccessLevel PROTECTED

Limits access to public and protected entities

PUBLICback to summary
public static final AccessLevel PUBLIC

Limits access to public entities

Constructor Detail

AccessLevelback to summary
private AccessLevel()

Method Detail

ofback to summary
public static AccessLevel of(Set<Modifier> mods)
valueOfback to summary
public static AccessLevel valueOf(String name)
valuesback to summary
public static AccessLevel[] values()