Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javafe.ast
Class TypeDecl

    java.lang.Object
      javafe.ast.ASTNode
          javafe.ast.TypeDecl

All Implemented Interfaces:
  java.lang.Cloneable, TypeDeclElem

Direct Known Subclasses:
  ClassDecl, InterfaceDecl

public abstract class TypeDecl
extends ASTNode
implements TypeDeclElem

Represents a TypeDeclaration. Common fields of ClassDeclarations and InterfaceDeclarations are here.

Field Summary
`TypeDeclElemVec` | `elems`
`Identifier` | `id`
`int` | `loc`
`int` | `locCloseBrace`
`int` | `locId`
`int` | `locOpenBrace`
`int` | `modifiers`
`TypeDecl` | `parent`
`ModifierPragmaVec` | `pmodifiers`
`boolean` | `specOnly` If specOnly is true, then this is only a spec.
`TypeNameVec` | `superInterfaces`
`TypeModifierPragmaVec` | `tmodifiers`

Fields inherited from class javafe.ast.ASTNode
`decorations`

Constructor Summary
`protected` | `TypeDecl()` Construct a raw TypeDecl whose class invariant(s) have not yet been established.

Method Summary
`void` | `check()`
`int` | `getEndLoc()`
`int` | `getModifiers()`
`TypeDecl` | `getParent()` The TypeDecl we are an element of, or null if we do not have a parent (cf. hasParent).
`ModifierPragmaVec` | `getPModifiers()`
`int` | `getStartLoc()`
`boolean` | `isBinary()`
`private void` | `postCheck()`
`void` | `setModifiers(int m)`
`void` | `setParent(TypeDecl p)`

Methods inherited from class javafe.ast.ASTNode
`accept, accept, childAt, childCount, clone, clone, getDecorations, getTag, setDecorations, toString`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface javafe.ast.TypeDeclElem
`accept, accept, getTag`

Field Detail

### specOnly

    public boolean specOnly

  If specOnly is true, then this is only a spec. In particular, methods do not have non-empty bodies, no initializers are present for fields, and no static bodies are present.

### modifiers

    public int modifiers

### pmodifiers

    public ModifierPragmaVec pmodifiers

### id

    public Identifier id

### superInterfaces

    public TypeNameVec superInterfaces

### tmodifiers

    public TypeModifierPragmaVec tmodifiers

### elems

    public TypeDeclElemVec elems

### loc

    public int loc

### locId

    public int locId

### locOpenBrace

    public int locOpenBrace

### locCloseBrace

    public int locCloseBrace

### parent

    public TypeDecl parent

Constructor Detail

### TypeDecl

    protected TypeDecl()

  Construct a raw TypeDecl whose class invariant(s) have not yet been established. It is the caller's job to initialize the returned node's fields so that any class invariants hold.

Method Detail

### getParent

    public TypeDecl getParent()

  Description copied from interface: `TypeDeclElem`
  The TypeDecl we are an element of, or null if we do not have a parent (cf. hasParent).

  Specified by:
    `getParent` in interface `TypeDeclElem`

### setParent

    public void setParent(TypeDecl p)

  Specified by:
    `setParent` in interface `TypeDeclElem`

### getModifiers

    public int getModifiers()

  Specified by:
    `getModifiers` in interface `TypeDeclElem`

### setModifiers

    public void setModifiers(int m)

  Specified by:
    `setModifiers` in interface `TypeDeclElem`

### getPModifiers

    public ModifierPragmaVec getPModifiers()

  Specified by:
    `getPModifiers` in interface `TypeDeclElem`

### postCheck

    private void postCheck()

### isBinary

    public boolean isBinary()

  Returns:
    true iff this TypeDecl was created from a .class file. precondition: We have already been associated with a TypeSig.

### getStartLoc

    public int getStartLoc()

  Specified by:
    `getStartLoc` in interface `TypeDeclElem`
  Specified by:
    `getStartLoc` in class `ASTNode`

### getEndLoc

    public int getEndLoc()

  Overrides:
    `getEndLoc` in class `ASTNode`

### check

    public void check()

  Overrides:
    `check` in class `ASTNode`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

The ESC/Java2 Project Homepage