Package org.apache.juneau
Enum Class Visibility
- All Implemented Interfaces:
- Serializable,- Comparable<Visibility>,- Constable
Defines class/field/method visibilities.
 
Used to specify minimum levels of visibility when detecting bean classes, methods, and fields.
Used in conjunction with the following bean context properties:
- BeanContext.Builder.beanConstructorVisibility(Visibility)
- BeanContext.Builder.beanClassVisibility(Visibility)
- BeanContext.Builder.beanFieldVisibility(Visibility)
- BeanContext.Builder.beanMethodVisibility(Visibility)
See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum Constants
- 
Method SummaryModifier and TypeMethodDescriptionbooleanisVisible(int mod) Identifies if the specified mod matches this visibility.booleanShortcut forisVisible(x.getModifiers()); booleanShortcut forisVisible(x.getModifiers()); booleanShortcut forisVisible(x.getModifiers()); <T> Constructor<T>transform(Constructor<T> x) Makes constructor accessible if it matches the visibility requirements, or returnsnull if it doesn't.Makes field accessible if it matches the visibility requirements, or returnsnull if it doesn't.Makes method accessible if it matches the visibility requirements, or returnsnull if it doesn't.static VisibilityReturns the enum constant of this class with the specified name.static Visibility[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
NONEIgnore all
- 
PUBLICInclude onlypublic classes/fields/methods.
- 
PROTECTEDInclude onlypublic orprotected classes/fields/methods.
- 
DEFAULTInclude all butprivate classes/fields/methods.
- 
PRIVATEInclude all classes/fields/methods.
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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 name
- NullPointerException- if the argument is null
 
- 
isVisibleIdentifies if the specified mod matches this visibility.Example:PUBLIC .isVisible(MyPublicClass.class .getModifiers());//true PUBLIC .isVisible(MyPrivateClass.class .getModifiers());//false PRIVATE .isVisible(MyPrivateClass.class .getModifiers());//true NONE .isVisible(MyPublicClass.class .getModifiers());//false - Parameters:
- mod- The modifier from the object being tested (e.g. results from- Class.getModifiers().
- Returns:
- true if this visibility matches the specified modifier attribute.
 
- 
isVisibleShortcut forisVisible(x.getModifiers()); - Parameters:
- x- The class to check.
- Returns:
- true if the class is at least as visible as this object.
 
- 
isVisibleShortcut forisVisible(x.getModifiers()); - Parameters:
- x- The constructor to check.
- Returns:
- true if the constructor is at least as visible as this object.
 
- 
isVisibleShortcut forisVisible(x.getModifiers()); - Parameters:
- x- The field to check.
- Returns:
- true if the field is at least as visible as this object.
 
- 
transformMakes constructor accessible if it matches the visibility requirements, or returnsnull if it doesn't.Security exceptions thrown on the call to Constructor.setAccessible(boolean)are quietly ignored.- Type Parameters:
- T- The class type.
- Parameters:
- x- The constructor.
- Returns:
- The same constructor if visibility requirements met, or null if visibility requirement not met or call toConstructor.setAccessible(boolean)throws a security exception.
 
- 
transformMakes method accessible if it matches the visibility requirements, or returnsnull if it doesn't.Security exceptions thrown on the call to Method.setAccessible(boolean)are quietly ignored.- Parameters:
- x- The method.
- Returns:
- The same method if visibility requirements met, or null if visibility requirement not met or call toMethod.setAccessible(boolean)throws a security exception.
 
- 
transformMakes field accessible if it matches the visibility requirements, or returnsnull if it doesn't.Security exceptions thrown on the call to Field.setAccessible(boolean)are quietly ignored.- Parameters:
- x- The field.
- Returns:
- The same field if visibility requirements met, or null if visibility requirement not met or call toField.setAccessible(boolean)throws a security exception.
 
 
-