scale.clef.decl
Enum Residency

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

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

This enum specifies the residency of a declaration - auto, register, 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
AUTO
          Marks a data value as being locally allocated (i.e., on the stack).
MEMORY
          Recommends that an entity be assigned to permanently allocated space.
REGISTER
          Recommends that a value be assigned to a register.
 
Method Summary
 java.lang.String toString()
           
static Residency valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Residency[] 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

AUTO

public static final Residency AUTO
Marks a data value as being locally allocated (i.e., on the stack). Local allocation is the default form of allocation and so seldom (if ever) needs to be explicitly specified. This attribute represents C/C++'s auto construct.


REGISTER

public static final Residency REGISTER
Recommends that a value be assigned to a register. If the value cannot be assigned to a register, it should be allocated on the stack.


MEMORY

public static final Residency MEMORY
Recommends that an entity be assigned to permanently allocated space.

Method Detail

values

public static Residency[] 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 (Residency c : Residency.values())
    System.out.println(c);

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

valueOf

public static Residency 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<Residency>