Package student.testingsupport
Enum Class ReflectionSupport.VisibilityConstraint
java.lang.Object
java.lang.Enum<ReflectionSupport.VisibilityConstraint>
student.testingsupport.ReflectionSupport.VisibilityConstraint
- All Implemented Interfaces:
Serializable
,Comparable<ReflectionSupport.VisibilityConstraint>
,Constable
- Enclosing class:
- ReflectionSupport
public static enum ReflectionSupport.VisibilityConstraint
extends Enum<ReflectionSupport.VisibilityConstraint>
An enumeration that represents a set of constants for specifying
constraints on the visibility of a declaration.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDeclared with any visibility.Declared with package-level (default), protected, or public visibility.Declared with protected or public visibility.Declared with package-level (default) visibility (only).Declared with private visibility (only).Declared with protected visibility (only).Declared with public visibility (only). -
Method Summary
Modifier and TypeMethodDescriptionboolean
accepts
(int modifiers) Determine if a given set of modifiers, expressed as an integer mask, meets this visibility constraint.boolean
Determine if a given member meets this visibility constraint.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DECLARED_PRIVATE
Declared with private visibility (only). -
DECLARED_PACKAGE
Declared with package-level (default) visibility (only). -
DECLARED_PROTECTED
Declared with protected visibility (only). -
DECLARED_PUBLIC
Declared with public visibility (only). -
AT_LEAST_PROTECTED
Declared with protected or public visibility. -
AT_LEAST_PACKAGE
Declared with package-level (default), protected, or public visibility. -
ANY_VISIBILITY
Declared with any visibility.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
accepts
public boolean accepts(int modifiers) Determine if a given set of modifiers, expressed as an integer mask, meets this visibility constraint.- Parameters:
modifiers
- The modifiers to check.- Returns:
- True if the modifiers are consistent with this constraint.
-
accepts
Determine if a given member meets this visibility constraint.- Parameters:
member
- The member to check.- Returns:
- True if the member's visibility is consistent with this constraint.
-