jass.modern
Enum Visibility

java.lang.Object
  extended by java.lang.Enum<Visibility>
      extended by jass.modern.Visibility
All Implemented Interfaces:
Serializable, Comparable<Visibility>

public enum Visibility
extends Enum<Visibility>

An enumeration type which is to define the visibility of contract annotations.
In general, the visibility is analog to the modifiers defined in chapter 6.6 of the Java language specification. However, in addition to public, protected, package private, and private a type TARGET exists which is used to express that a specification inherits the visibility of its target.

Author:
riejo
See Also:
Invariant.visibility(), SpecCase.visibility()

Enum Constant Summary
PACKAGE_PRIVATE
          The package private modifier.
PRIVATE
          The private modifier.
PROTECTED
          The protected modifier.
PUBLIC
          The public modifier.
TARGET
          Inherits the visibility of its target.
 
Method Summary
private static boolean mask(int mask, int flag)
           
static Visibility parseVisibility(int accessflag)
          Returns the visibility which is encoded in the accessflag.
static Visibility parseVisibility(Modifier modifier)
           
 Modifier toModifier()
           
 String toString()
           
static Visibility valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Visibility[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PUBLIC

public static final Visibility PUBLIC
The public modifier.


PROTECTED

public static final Visibility PROTECTED
The protected modifier.


PACKAGE_PRIVATE

public static final Visibility PACKAGE_PRIVATE
The package private modifier.


PRIVATE

public static final Visibility PRIVATE
The private modifier.


TARGET

public static final Visibility TARGET
Inherits the visibility of its target.

Method Detail

values

public static final Visibility[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for(Visibility c : Visibility.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Visibility valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name

parseVisibility

public static Visibility parseVisibility(int accessflag)
Returns the visibility which is encoded in the accessflag. See http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#1513 for values of accessflag.

Parameters:
accessflag -
Returns:
Default is , TARGET will never be returned, otherwise it is depended on the accessflag.
See Also:
mask(int, int)

mask

private static boolean mask(int mask,
                            int flag)

parseVisibility

public static Visibility parseVisibility(Modifier modifier)

toModifier

public Modifier toModifier()

toString

public String toString()
Overrides:
toString in class Enum<Visibility>