com.sodius.mdw.core.eval.project
Class VisibilityKind

java.lang.Object
  extended by com.sodius.mdw.core.eval.project.VisibilityKind

public final class VisibilityKind
extends Object

Enumerations of known rule and script visibilities.

This class cannot be instantiated or subclassed by clients.

See Also:
Rule.getVisibility(), Script.getVisibility()

Field Summary
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).
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENTRY_POINT

public static final VisibilityKind ENTRY_POINT
entry : the rule is available to the end-user (only valid for rules).


PUBLIC

public static final 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).


PROTECTED

public static final 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).


PACKAGE

public static final VisibilityKind PACKAGE
package : the element is visible from the package in which the element is defined (valid for rules and scripts).


PRIVATE

public static final VisibilityKind PRIVATE
private : the element is not visible outside of the resource (valid for rules and scripts).

Method Detail

valueOf

public static VisibilityKind valueOf(String value)
                              throws IllegalArgumentException
Determines the visibility represented as a String value.

Parameters:
value - a String representing a visibility.
Returns:
the corresponding visibility.
Throws:
IllegalArgumentException - if the value is not recognized.

isEntryPoint

public boolean isEntryPoint()
Return true if the visibility is entry.

Returns:
true if the visibility is entry.
See Also:
ENTRY_POINT

isPublic

public boolean isPublic()
Return true if the visibility is public.

Returns:
true if the visibility is public.
See Also:
PUBLIC

isProtected

public boolean isProtected()
Return true if the visibility is protected.

Returns:
true if the visibility is protected.
See Also:
PROTECTED

isPackage

public boolean isPackage()
Return true if the visibility is package.

Returns:
true if the visibility is package.
See Also:
PACKAGE

isPrivate

public boolean isPrivate()
Return true if the visibility is private.

Returns:
true if the visibility is private.
See Also:
PRIVATE

compareTo

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

Parameters:
visibility - the visibility to compare with.
Returns:
a negative integer, zero, or a positive integer as this visibility is less than, equal to, or greater than the specified visibility.

toString

public String toString()
Returns a String representation of this visibility.

Overrides:
toString in class Object
Returns:
the visibility as a String.