001 // -*- mode: java -*-
002 /* Copyright 2000, 2001, Compaq Computer Corporation */
003
004 /* IF THIS IS A JAVA FILE, DO NOT EDIT IT!
005
006 Most Java files in this directory which are part of the Javafe AST
007 are automatically generated using the astgen comment (see
008 ESCTools/Javafe/astgen) from the input file 'hierarchy.h'. If you
009 wish to modify AST classes or introduce new ones, modify
010 'hierarchy.j.'
011 */
012
013 package javafe.ast;
014
015 import javafe.util.Assert;
016 import javafe.util.Location;
017 import javafe.util.ErrorSet;
018
019 // Convention: unless otherwise noted, integer fields named "loc" refer
020 // to the location of the first character of the syntactic unit
021
022
023 public abstract class TypeDeclElemPragma
024 extends ASTNode implements TypeDeclElem
025 {
026 /* denotes that a pragma is redundant (e.g. "invariant_redundantly") */
027 public boolean redundant;
028
029
030 //@ invariant hasParent ==> parent != null;
031 public TypeDecl parent;
032
033 public TypeDecl getParent() { return parent; }
034 public void setParent(/*@non_null*/ TypeDecl p) { parent = p; }
035 public void decorate(ModifierPragmaVec modifierPragmas) {}
036 protected TypeDeclElemPragma() {}
037
038 abstract public int getTag();
039 public int getModifiers() { return 0; }
040 public void setModifiers(int m) {}
041 public ModifierPragmaVec getPModifiers() { return null; }
042 public boolean isRedundant() { return redundant; }
043 public void setRedundant(boolean v) { redundant = v; }
044
045
046 // Generated boilerplate constructors:
047
048 //@ ensures this.redundant == redundant;
049 protected TypeDeclElemPragma(boolean redundant) {
050 super();
051 this.redundant = redundant;
052 }
053 public void check() {
054 super.check();
055 }
056
057 }