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

## escjava.parser
Class ErrorPragmaParser

    java.lang.Object
      escjava.parser.ErrorPragmaParser

All Implemented Interfaces:
  PragmaParser

public class ErrorPragmaParser
extends java.lang.Object
implements PragmaParser

This class produces a `PragmaParser` that reports an client-chosen error message each time an annotation comment is encountered. (Javadoc comments are also considered annotations.)

Field Summary
`java.lang.String` | `msg` The error message to report.

Constructor Summary
`ErrorPragmaParser(java.lang.String msg)` Create a new ErrorPragmaParser that report error message msg.

Method Summary
`boolean` | `checkTag(int tag)` We consider both ESC and Javadoc comments to be annotations.
`void` | `close()` No work to close us.
`boolean` | `getNextPragma(Token dst)` Produce no actual pragmas.
`FieldDecl` | `isPragmaDecl(Token l)`
`void` | `restart(CorrelatedReader in, boolean eolComment)` Report an error for each annotation comment

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

Field Detail

### msg

    public java.lang.String msg

  The error message to report.

Constructor Detail

### ErrorPragmaParser

    public ErrorPragmaParser(java.lang.String msg)

  Create a new ErrorPragmaParser that report error message msg.

Method Detail

### checkTag

    public boolean checkTag(int tag)

  We consider both ESC and Javadoc comments to be annotations.

  Specified by:
    `checkTag` in interface `PragmaParser`

### restart

    public void restart(CorrelatedReader in,
                        boolean eolComment)

  Report an error for each annotation comment

  Specified by:
    `restart` in interface `PragmaParser`

### getNextPragma

    public boolean getNextPragma(Token dst)

  Produce no actual pragmas.

  Specified by:
    `getNextPragma` in interface `PragmaParser`

### close

    public void close()

  No work to close us.

  Specified by:
    `close` in interface `PragmaParser`

### isPragmaDecl

    public FieldDecl isPragmaDecl(Token l)

  Specified by:
    `isPragmaDecl` in interface `PragmaParser`

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