public final class VisibilityKind extends Object
This class cannot be instantiated or subclassed by clients.
Rule.getVisibility()
,
Script.getVisibility()
Modifier and Type | Field and Description |
---|---|
static VisibilityKind |
ENTRY_POINT
entry : the rule is available to the end-user (only valid for rules).
|
static VisibilityKind |
PACKAGE
package : the element is visible from the package in which the element is defined (valid for rules and scripts).
|
static VisibilityKind |
PRIVATE
private : the element is not visible outside of the resource (valid for rules and scripts).
|
static VisibilityKind |
PROTECTED
protected : the element is visible from the package in which the element is defined
and on sub types of the script (valid for rules and scripts).
|
static VisibilityKind |
PUBLIC
public : the script is visible from everywhere,
the rule is visible from everywhere but should not be presented to the end-user (valid for rules and scripts).
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(VisibilityKind visibility)
Compares this visibility with the specified visibility for order.
|
boolean |
isEntryPoint()
Return
true if the visibility is entry . |
boolean |
isPackage()
Return
true if the visibility is package . |
boolean |
isPrivate()
Return
true if the visibility is private . |
boolean |
isProtected()
Return
true if the visibility is protected . |
boolean |
isPublic()
Return
true if the visibility is public . |
String |
toString()
Returns a
String representation of this visibility. |
static VisibilityKind |
valueOf(String value)
Determines the visibility represented as a
String value. |
public static final VisibilityKind ENTRY_POINT
public static final VisibilityKind PUBLIC
public static final VisibilityKind PROTECTED
public static final VisibilityKind PACKAGE
public static final VisibilityKind PRIVATE
public static VisibilityKind valueOf(String value) throws IllegalArgumentException
String
value.value
- a String
representing a visibility.IllegalArgumentException
- if the value is not recognized.public boolean isEntryPoint()
true
if the visibility is entry
.true
if the visibility is entry
.ENTRY_POINT
public boolean isPublic()
true
if the visibility is public
.true
if the visibility is public
.PUBLIC
public boolean isProtected()
true
if the visibility is protected
.true
if the visibility is protected
.PROTECTED
public boolean isPackage()
true
if the visibility is package
.true
if the visibility is package
.PACKAGE
public boolean isPrivate()
true
if the visibility is private
.true
if the visibility is private
.PRIVATE
public int compareTo(VisibilityKind visibility)
Compares this visibility with the specified visibility for order. Returns a negative integer, zero, or a positive integer as this visibility is less than, equal to, or greater than the specified visibility.
The lowest visibility is PRIVATE
, the highest is ENTRY_POINT
visibility
- the visibility to compare with.