| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mit.csail.sdg.alloy4compiler.ast.Decl
public final class Decl
Immutable; this declaration binds a list of names to an expression.
| Field Summary | |
|---|---|
|  Pos | disjointIf nonnull, then each name is disjoint (and this.disjoint is the location of the "disjoint" keyword) | 
|  Pos | disjoint2If nonnull, then each atom of this sig has disjoint value for this field (and this.disjoint2 is the location of the "disjoint" keyword) | 
|  Expr | exprThe value that the list of names are bound to. | 
|  Pos | isPrivateIf nonnull, then this decl is private (and this.isPrivate is the location of the "private" keyword) | 
|  ConstList<? extends ExprHasName> | namesThe list of names. | 
| Constructor Summary | |
|---|---|
| Decl(Pos isPrivate,
     Pos disjoint,
     Pos disjoint2,
     java.util.List<? extends ExprHasName> names,
     Expr expr)This constructs a declaration; the list of names must not be empty. | |
| Method Summary | |
|---|---|
| static ExprHasName | findDuplicateName(java.util.List<Decl> list)If the list of declaration contains a duplicate name, return one such duplicate name, else return null. | 
|  ExprHasName | get()Return the first variable in this declaration. | 
|  boolean | hasName(java.lang.String name)Returns true if this declaration contains the given name. | 
|  Pos | span()Returns a Pos object representing the entire span of this expression and all its subexpressions. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public final Pos isPrivate
public final Pos disjoint
public final Pos disjoint2
public final ConstList<? extends ExprHasName> names
public final Expr expr
| Constructor Detail | 
|---|
public Decl(Pos isPrivate,
            Pos disjoint,
            Pos disjoint2,
            java.util.List<? extends ExprHasName> names,
            Expr expr)
| Method Detail | 
|---|
public Pos span()
public ExprHasName get()
public static ExprHasName findDuplicateName(java.util.List<Decl> list)
public boolean hasName(java.lang.String name)
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||