edu.mit.csail.sdg.alloy4compiler.ast
Enum Attr.AttrType

java.lang.Object
  extended by java.lang.Enum<Attr.AttrType>
      extended by edu.mit.csail.sdg.alloy4compiler.ast.Attr.AttrType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Attr.AttrType>
Enclosing class:
Attr

public static enum Attr.AttrType
extends java.lang.Enum<Attr.AttrType>

This class contains all possible attribute types.


Enum Constant Summary
ABSTRACT
          ABSTRACT; if a PrimSig is abstract, it is equal to the union of its subsigs.
BUILTIN
          BUILTIN; every builtin Sig has the BUILTIN attribute, and every non-builtin Sig does not.
ENUM
          ENUM; if a PrimSig has the ENUM attribute, it is toplevel and abstract and has only singleton children.
EXACT
          EXACT; if a SubsetSig is exact, it is equal to the union of its parents.
LONE
          LONE; if a Sig is lone, it has at most one atom.
META
          META; if a Sig has the META attribute, it means it is a META atom corresponding to some real signature or field.
ONE
          ONE; if a Sig is one, it has exactly one atom.
PRIVATE
          PRIVATE; if a Sig has the PRIVATE attribute, it means its label is private within the same module.
SOME
          SOME; if a Sig is some, it has at least one atom.
SUBSET
          SUBSET; every SubsetSig has the SUBSET attribute set, and the SUBSIG attribute unset.
SUBSIG
          SUBSIG; every PrimSig (including the builtin sigs) has the SUBSIG attribute set, and the SUBSET attribute unset.
WHERE
          WHERE; if a Sig has a WHERE attribute, it defines where the sig was declared in the user model.
 
Method Summary
 Pos find(Attr... attributes)
          Returns the combined position for all Attribute of this type in the given array; null entries in the collection are ignored; if none are found we return null.
 Attr make(Pos pos)
          Construct an attribute of this type with this position; if pos==null, it is treated as Pos.UNKNOWN.
 Attr makenull(Pos pos)
          Construct an attribute of this type with this position; if pos==null, this method returns null.
 java.lang.String toString()
          
static Attr.AttrType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Attr.AttrType[] 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

WHERE

public static final Attr.AttrType WHERE
WHERE; if a Sig has a WHERE attribute, it defines where the sig was declared in the user model.


ABSTRACT

public static final Attr.AttrType ABSTRACT
ABSTRACT; if a PrimSig is abstract, it is equal to the union of its subsigs.


SOME

public static final Attr.AttrType SOME
SOME; if a Sig is some, it has at least one atom.


ONE

public static final Attr.AttrType ONE
ONE; if a Sig is one, it has exactly one atom.


LONE

public static final Attr.AttrType LONE
LONE; if a Sig is lone, it has at most one atom.


EXACT

public static final Attr.AttrType EXACT
EXACT; if a SubsetSig is exact, it is equal to the union of its parents.


SUBSIG

public static final Attr.AttrType SUBSIG
SUBSIG; every PrimSig (including the builtin sigs) has the SUBSIG attribute set, and the SUBSET attribute unset.


SUBSET

public static final Attr.AttrType SUBSET
SUBSET; every SubsetSig has the SUBSET attribute set, and the SUBSIG attribute unset.


META

public static final Attr.AttrType META
META; if a Sig has the META attribute, it means it is a META atom corresponding to some real signature or field.


PRIVATE

public static final Attr.AttrType PRIVATE
PRIVATE; if a Sig has the PRIVATE attribute, it means its label is private within the same module.


BUILTIN

public static final Attr.AttrType BUILTIN
BUILTIN; every builtin Sig has the BUILTIN attribute, and every non-builtin Sig does not.


ENUM

public static final Attr.AttrType ENUM
ENUM; if a PrimSig has the ENUM attribute, it is toplevel and abstract and has only singleton children.

Method Detail

values

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

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

valueOf

public static Attr.AttrType 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

make

public final Attr make(Pos pos)
Construct an attribute of this type with this position; if pos==null, it is treated as Pos.UNKNOWN.


makenull

public final Attr makenull(Pos pos)
Construct an attribute of this type with this position; if pos==null, this method returns null.


find

public Pos find(Attr... attributes)
Returns the combined position for all Attribute of this type in the given array; null entries in the collection are ignored; if none are found we return null.


toString

public final java.lang.String toString()

Overrides:
toString in class java.lang.Enum<Attr.AttrType>