scale.clef.type
Enum RefAttr

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

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

This enum specifies the attributes of a reference type - const, aligned, etc.

$Id$

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

This enum describes what attributes are associated with a type. Attributes are non-type information that is associated with a type because they can be associated with just a part of a type declaration.

See Also:
RefType

Enum Constant Summary
Aligned
          For types whose alignment was specified.
Const
          Indicates that instances of this type have a constant value.
None
           
Ordered
          For types with substructures, this attribute indicates if the source language requires the data layout to preserve the order of substructures (declaration order is assumed).
Restrict
          Marks a value which may not be changed by only by restricted means.
Traced
          Supports Modula-3's traced data types.
VaList
          For the type that represents the builtin type va_list.
Volatile
          Marks a value which may be changed by something which a compiler cannot detect.
 
Method Summary
static RefAttr valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static RefAttr[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

None

public static final RefAttr None

Const

public static final RefAttr Const
Indicates that instances of this type have a constant value. By default, instances of a type are mutable.

One could reasonably argue that the immutability of a value is not a property (or attribute) of a type. However, C++'s typedef construct permits immutability to be included with the type.


Volatile

public static final RefAttr Volatile
Marks a value which may be changed by something which a compiler cannot detect.


Aligned

public static final RefAttr Aligned
For types whose alignment was specified.


VaList

public static final RefAttr VaList
For the type that represents the builtin type va_list.


Restrict

public static final RefAttr Restrict
Marks a value which may not be changed by only by restricted means.


Ordered

public static final RefAttr Ordered
For types with substructures, this attribute indicates if the source language requires the data layout to preserve the order of substructures (declaration order is assumed).


Traced

public static final RefAttr Traced
Supports Modula-3's traced data types.

Method Detail

values

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

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

valueOf

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