## org.eclipse.ocl.util
Class ProblemHandlerWrapper.Tee

    java.lang.Object
      org.eclipse.ocl.util.ProblemHandlerWrapper
          org.eclipse.ocl.util.ProblemHandlerWrapper.Tee

All Implemented Interfaces:
  ProblemHandler

Enclosing class:
  ProblemHandlerWrapper

    public static class ProblemHandlerWrapper.Tee

extends ProblemHandlerWrapper

Like the UNIX tool `tee`, a `Tee` forks problem handling in two directions, that is, to two other problem-handler instances.

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.ocl.util.ProblemHandlerWrapper
`ProblemHandlerWrapper.Tee`

Nested classes/interfaces inherited from interface org.eclipse.ocl.lpg.ProblemHandler
`ProblemHandler.Phase, ProblemHandler.Severity`

Field Summary

Fields inherited from interface org.eclipse.ocl.lpg.ProblemHandler
`ERROR_MESSAGES`

Constructor Summary
`ProblemHandlerWrapper.Tee(ProblemHandler delegate, ProblemHandler tee)` Initializes me with the two problem-handler instances to which I delegate.

Method Summary
`void` `analyzerProblem(ProblemHandler.Severity problemSeverity, String problemMessage, String processingContext, int startOffset, int endOffset)` Convenience method typically invoking `handleProblem` with a `analyzerProblem` processing phase.
`void` `beginParse()` Notifies me that parsing is about to begin, from which I may receive problems.
`void` `beginValidation()` Notifies me that validation is about to begin, from which I may receive problems.
`void` `endParse()` Notifies me that parsing has completed, and I will get no further problems in this session.
`void` `endValidation()` Notifies me that validation has completed, and I will get no further problems in this session.
`void` `flush(Monitor monitor)` Flush all problems to their recipient.

`void`

`handleProblem(ProblemHandler.Severity problemSeverity, ProblemHandler.Phase processingPhase, String problemMessage, String processingContext, int startOffset, int endOffset)`
Handle a problem of problemSeverity that has arisen during processingPhase and which is explained by problemMessage optionally clarified, if non-null, by processingContext, and if non-negative by the startOffset and endOffset character indexes in the parsing stream.

`void` `lexerProblem(ProblemHandler.Severity problemSeverity, String problemMessage, String processingContext, int startOffset, int endOffset)` Convenience method typically invoking `handleProblem` with a `lexerProblem` processing phase.
`void` `parserProblem(ProblemHandler.Severity problemSeverity, String problemMessage, String processingContext, int startOffset, int endOffset)` Convenience method typically invoking `handleProblem` with a `parserProblem` processing phase.
`void` `setErrorReportLineOffset(int offset)` Sets the line offset for reporting errors.
`void` `setParser(AbstractParser parser)` Define the syntactic parser from which source tokens and text may be obtained.
`void` `utilityProblem(ProblemHandler.Severity problemSeverity, String problemMessage, String processingContext, int startOffset, int endOffset)` Convenience method typically invoking `handleProblem` with a `utilityProblem` processing phase.
`void` `validatorProblem(ProblemHandler.Severity problemSeverity, String problemMessage, String processingContext, int startOffset, int endOffset)` Convenience method typically invoking `handleProblem` with a `validatorProblem` processing phase.

Methods inherited from class org.eclipse.ocl.util.ProblemHandlerWrapper
`getErrorReportLineOffset, getParser`

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

Constructor Detail

### ProblemHandlerWrapper.Tee

    public ProblemHandlerWrapper.Tee(ProblemHandler delegate,
                                     ProblemHandler tee)

  Initializes me with the two problem-handler instances to which I delegate.

  Parameters:
    `delegate` - one delegate
    `tee` - the additional delegate

Method Detail

### analyzerProblem

    public void analyzerProblem(ProblemHandler.Severity problemSeverity,
                                String problemMessage,
                                String processingContext,
                                int startOffset,
                                int endOffset)

  Description copied from interface: `ProblemHandler`
  Convenience method typically invoking `handleProblem` with a `analyzerProblem` processing phase.

  Specified by:
    `analyzerProblem` in interface `ProblemHandler`
  Overrides:
    `analyzerProblem` in class `ProblemHandlerWrapper`
  Parameters:
    `problemSeverity` - text describing the problem severity
    `problemMessage` - message describing the problem
    `processingContext` - optional message describing the reporting context (e.g. `"PathNameCS"`)
    `startOffset` - (inclusive) index of first source character influencing the problem, -ve if unknown
    `endOffset` - (exclusive) index of last source character influencing the problem, -ve if unknown

### beginParse

    public void beginParse()

  Description copied from interface: `ProblemHandler`
  Notifies me that parsing is about to begin, from which I may receive problems. I should initialize myself accordingly, if necessary.

  Specified by:
    `beginParse` in interface `ProblemHandler`
  Overrides:
    `beginParse` in class `ProblemHandlerWrapper`

### beginValidation

    public void beginValidation()

  Description copied from interface: `ProblemHandler`
  Notifies me that validation is about to begin, from which I may receive problems. I should initialize myself accordingly, if necessary.

  Specified by:
    `beginValidation` in interface `ProblemHandler`
  Overrides:
    `beginValidation` in class `ProblemHandlerWrapper`

### endParse

    public void endParse()

  Description copied from interface: `ProblemHandler`
  Notifies me that parsing has completed, and I will get no further problems in this session. I may clean up accordingly, if necessary.

  Specified by:
    `endParse` in interface `ProblemHandler`
  Overrides:
    `endParse` in class `ProblemHandlerWrapper`

### endValidation

    public void endValidation()

  Description copied from interface: `ProblemHandler`
  Notifies me that validation has completed, and I will get no further problems in this session. I may clean up accordingly, if necessary.

  Specified by:
    `endValidation` in interface `ProblemHandler`
  Overrides:
    `endValidation` in class `ProblemHandlerWrapper`

### flush

    public void flush(Monitor monitor)

  Description copied from interface: `ProblemHandler`
  Flush all problems to their recipient. This method allows handlers to batch up error reports into a single composite report or transaction.

  Specified by:
    `flush` in interface `ProblemHandler`
  Overrides:
    `flush` in class `ProblemHandlerWrapper`
  Parameters:
    `monitor` - an optional EMF monitor for reporting progress. May be `null` if not needed by the caller

### handleProblem

    public void handleProblem(ProblemHandler.Severity problemSeverity,
                              ProblemHandler.Phase processingPhase,
                              String problemMessage,
                              String processingContext,
                              int startOffset,
                              int endOffset)

  Description copied from interface: `ProblemHandler`
  Handle a problem of problemSeverity that has arisen during processingPhase and which is explained by problemMessage optionally clarified, if non-null, by processingContext, and if non-negative by the startOffset and endOffset character indexes in the parsing stream. All other problem handling messages should redirect to this method.

  Specified by:
    `handleProblem` in interface `ProblemHandler`
  Overrides:
    `handleProblem` in class `ProblemHandlerWrapper`
  Parameters:
    `problemSeverity` - text describing the problem severity (e.g. `errorSeverity`)
    `processingPhase` - optional text describing the processing phase (e.g. `analyzerProblem`)
    `problemMessage` - message describing the problem
    `processingContext` - optional message describing the reporting context (e.g. `"PathNameCS"`)
    `startOffset` - (inclusive) index of first source character influencing the problem, -ve if unknown
    `endOffset` - (exclusive) index of last source character influencing the problem, -ve if unknown

### lexerProblem

    public void lexerProblem(ProblemHandler.Severity problemSeverity,
                             String problemMessage,
                             String processingContext,
                             int startOffset,
                             int endOffset)

  Description copied from interface: `ProblemHandler`
  Convenience method typically invoking `handleProblem` with a `lexerProblem` processing phase.

  Specified by:
    `lexerProblem` in interface `ProblemHandler`
  Overrides:
    `lexerProblem` in class `ProblemHandlerWrapper`
  Parameters:
    `problemSeverity` - text describing the problem severity
    `problemMessage` - message describing the problem
    `processingContext` - optional message describing the reporting context (e.g. `"PathNameCS"`)
    `startOffset` - (inclusive) index of first source character influencing the problem, -ve if unknown
    `endOffset` - (exclusive) index of last source character influencing the problem, -ve if unknown

### parserProblem

    public void parserProblem(ProblemHandler.Severity problemSeverity,
                              String problemMessage,
                              String processingContext,
                              int startOffset,
                              int endOffset)

  Description copied from interface: `ProblemHandler`
  Convenience method typically invoking `handleProblem` with a `parserProblem` processing phase.

  Specified by:
    `parserProblem` in interface `ProblemHandler`
  Overrides:
    `parserProblem` in class `ProblemHandlerWrapper`
  Parameters:
    `problemSeverity` - text describing the problem severity
    `problemMessage` - message describing the problem
    `processingContext` - optional message describing the reporting context (e.g. `"PathNameCS"`)
    `startOffset` - (inclusive) index of first source character influencing the problem, -ve if unknown
    `endOffset` - (exclusive) index of last source character influencing the problem, -ve if unknown

### setErrorReportLineOffset

    public void setErrorReportLineOffset(int offset)

  Description copied from interface: `ProblemHandler`
  Sets the line offset for reporting errors. E.g,. if an error occurred at line 2, but the offset was set to -1, then line 1 will be reported.

  Specified by:
    `setErrorReportLineOffset` in interface `ProblemHandler`
  Overrides:
    `setErrorReportLineOffset` in class `ProblemHandlerWrapper`

### setParser

    public void setParser(AbstractParser parser)

  Description copied from interface: `ProblemHandler`
  Define the syntactic parser from which source tokens and text may be obtained.

  Specified by:
    `setParser` in interface `ProblemHandler`
  Overrides:
    `setParser` in class `ProblemHandlerWrapper`

### utilityProblem

    public void utilityProblem(ProblemHandler.Severity problemSeverity,
                               String problemMessage,
                               String processingContext,
                               int startOffset,
                               int endOffset)

  Description copied from interface: `ProblemHandler`
  Convenience method typically invoking `handleProblem` with a `utilityProblem` processing phase.

  Specified by:
    `utilityProblem` in interface `ProblemHandler`
  Overrides:
    `utilityProblem` in class `ProblemHandlerWrapper`
  Parameters:
    `problemSeverity` - text describing the problem severity
    `problemMessage` - message describing the problem
    `processingContext` - optional message describing the reporting context (e.g. `"PathNameCS"`)
    `startOffset` - (inclusive) index of first source character influencing the problem, -ve if unknown
    `endOffset` - (exclusive) index of last source character influencing the problem, -ve if unknown

### validatorProblem

    public void validatorProblem(ProblemHandler.Severity problemSeverity,
                                 String problemMessage,
                                 String processingContext,
                                 int startOffset,
                                 int endOffset)

  Description copied from interface: `ProblemHandler`
  Convenience method typically invoking `handleProblem` with a `validatorProblem` processing phase.

  Specified by:
    `validatorProblem` in interface `ProblemHandler`
  Overrides:
    `validatorProblem` in class `ProblemHandlerWrapper`
  Parameters:
    `problemSeverity` - text describing the problem severity
    `problemMessage` - message describing the problem
    `processingContext` - optional message describing the reporting context (e.g. `"PathNameCS"`)
    `startOffset` - (inclusive) index of first source character influencing the problem, -ve if unknown
    `endOffset` - (exclusive) index of last source character influencing the problem, -ve if unknown

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.