JML

org.multijava.util.compiler
Class UnpositionedError

java.lang.Object
  extended byjava.lang.Throwable
      extended byorg.multijava.util.compiler.UnpositionedError
All Implemented Interfaces:
Serializable

public class UnpositionedError
extends Throwable

This class is the root class for all compiler errors without a reference to the source text.


Field Summary
private  Message message
           
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
UnpositionedError(Message message)
          An exception with a formatted message as argument
UnpositionedError(MessageDescription description)
          An exception without parameters
UnpositionedError(MessageDescription description, Object parameter)
          An exception with one parameter
UnpositionedError(MessageDescription description, Object parameter1, Object parameter2)
          An exception with two parameters
UnpositionedError(MessageDescription description, Object[] parameters)
          An exception with an arbitrary number of parameters
 
Method Summary
 PositionedError addPosition(TokenReference where)
          Returns an error with a reference to the source file.
 String getErrorMessage()
          Returns the string explaining the exception.
 Message getFormattedMessage()
          Returns the formatted message.
 String getMessage()
          Returns a string explaining the exception.
 boolean hasDescription(MessageDescription description)
          Returns true iff the error has specified description.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

message

private Message message
Constructor Detail

UnpositionedError

public UnpositionedError(Message message)
An exception with a formatted message as argument

Parameters:
message - the formatted message

UnpositionedError

public UnpositionedError(MessageDescription description,
                         Object[] parameters)
An exception with an arbitrary number of parameters

Parameters:
description - the message description
parameters - the array of parameters

UnpositionedError

public UnpositionedError(MessageDescription description,
                         Object parameter1,
                         Object parameter2)
An exception with two parameters

Parameters:
description - the message description
parameter1 - the first parameter
parameter2 - the second parameter

UnpositionedError

public UnpositionedError(MessageDescription description,
                         Object parameter)
An exception with one parameter

Parameters:
description - the message description
parameter - the parameter

UnpositionedError

public UnpositionedError(MessageDescription description)
An exception without parameters

Parameters:
description - the message description
Method Detail

getMessage

public String getMessage()
Returns a string explaining the exception.

Overrides:
getMessage in class Throwable

getFormattedMessage

public Message getFormattedMessage()
Returns the formatted message.


getErrorMessage

public String getErrorMessage()
Returns the string explaining the exception.


hasDescription

public boolean hasDescription(MessageDescription description)
Returns true iff the error has specified description.


addPosition

public PositionedError addPosition(TokenReference where)
Returns an error with a reference to the source file.

Parameters:
where - the position in the source file responsible for the error

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.