scale.clef.decl
Enum Visibility

java.lang.Object
  extended by java.lang.Enum<Visibility>
      extended by scale.clef.decl.Visibility
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Visibility>

public enum Visibility
extends java.lang.Enum<Visibility>

This enum specifies the visibility of a declaration - local, global, etc.

$Id$

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.


Enum Constant Summary
EXTERN
          Indicates that an entity is defined external to this file scope.
FILE
          Indicates that the entity is visible only within its file scope.
GLOBAL
          Indicates that an entity is defined in, and has global visibility outside, this file scope.
LOCAL
          Indicates that an entity is visible only within its current scope.
 
Method Summary
 java.lang.String toString()
           
static Visibility valueOf(java.lang.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

LOCAL

public static final Visibility LOCAL
Indicates that an entity is visible only within its current scope. This is the default visibility.


FILE

public static final Visibility FILE
Indicates that the entity is visible only within its file scope. This attribute is intended to represent one meaning of the C/C++ static construct. Admittedly, this attribute should be redundant with cLocal when at the file scope level. However, this captures the notion of C/C++'s static construct; whereas, cLocal should never be used.


GLOBAL

public static final Visibility GLOBAL
Indicates that an entity is defined in, and has global visibility outside, this file scope.


EXTERN

public static final Visibility EXTERN
Indicates that an entity is defined external to this file scope. This attribute implements the common case of the C extern construct.

Method Detail

values

public static 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(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toString

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