com.tensegrity.generic.util.metric
Class MetricExpressionParserException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.tensegrity.generic.util.StaticException
              extended bycom.tensegrity.generic.util.metric.MetricExpressionParserException
All Implemented Interfaces:
java.io.Serializable

public class MetricExpressionParserException
extends StaticException

* The MetricParserException is thrown whenever an error occurs during the metric expression parsing.

* * * * * * * * * * * * * * * * * * *

Version:
$Id: MetricExpressionParserException.java,v 1.5 2006/01/27 08:34:57 MichaelKegel Exp $
Author:
MKegel
See Also:
Serialized Form

Field Summary
static int REASON_INVALID_VALUE
          constant that indicates an invalid given value enum.value MetricExpressionParserException_Reason
static int REASON_MALFORMED_EXPRESSION
          constant that indicates a malformed expression enum.value MetricExpressionParserException_Reason
static int REASON_MALFORMED_UNITABBREVIATION
          constant that indicates a malformed unit abbreviation for the expression enum.value MetricExpressionParserException_Reason
static int REASON_NULL
          constant that indicates the given value to parse was null enum.value MetricExpressionParserException_Reason
static int REASON_UNKNOWN
          constant that indicates an unknown reason for the exception enum.value MetricExpressionParserException_Reason
 
Constructor Summary
MetricExpressionParserException(java.lang.String description)
          Deprecated. specify a reason id.
MetricExpressionParserException(java.lang.String description, int reasonID, java.lang.String expression)
          Constructor for MetricParserException with a description given by description and a reason ID, which lets receivers of this Exceptions do a classification.
 
Method Summary
 java.lang.String getExpression()
          Return the string representation of a metric expression that has caused the MetricExpressionParserException while it has been parsed.
 int getReasonID()
          Returns the current reason identifier for this Exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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

REASON_UNKNOWN

public static final int REASON_UNKNOWN
constant that indicates an unknown reason for the exception enum.value MetricExpressionParserException_Reason

See Also:
Constant Field Values

REASON_NULL

public static final int REASON_NULL
constant that indicates the given value to parse was null enum.value MetricExpressionParserException_Reason

See Also:
Constant Field Values

REASON_INVALID_VALUE

public static final int REASON_INVALID_VALUE
constant that indicates an invalid given value enum.value MetricExpressionParserException_Reason

See Also:
Constant Field Values

REASON_MALFORMED_EXPRESSION

public static final int REASON_MALFORMED_EXPRESSION
constant that indicates a malformed expression enum.value MetricExpressionParserException_Reason

See Also:
Constant Field Values

REASON_MALFORMED_UNITABBREVIATION

public static final int REASON_MALFORMED_UNITABBREVIATION
constant that indicates a malformed unit abbreviation for the expression enum.value MetricExpressionParserException_Reason

See Also:
Constant Field Values
Constructor Detail

MetricExpressionParserException

public MetricExpressionParserException(java.lang.String description)
Deprecated. specify a reason id.

Constructor for MetricParserException with a description given by description

Parameters:
description - textual description about the cause of the exception

MetricExpressionParserException

public MetricExpressionParserException(java.lang.String description,
                                       int reasonID,
                                       java.lang.String expression)
Constructor for MetricParserException with a description given by description and a reason ID, which lets receivers of this Exceptions do a classification.

Parameters:
description - textual description about the reason for this exception.
reasonID - an identifier describing the category of this exception.
expression - the current expression the parser could not compute.
See Also:
REASON_MALFORMED_UNITABBREVIATION, REASON_INVALID_VALUE, REASON_MALFORMED_EXPRESSION, REASON_NULL
Method Detail

getReasonID

public int getReasonID()
Returns the current reason identifier for this Exception.

Returns:
and integer which is one of the predefined identifier of this class.
See Also:
REASON_MALFORMED_UNITABBREVIATION, REASON_INVALID_VALUE, REASON_MALFORMED_EXPRESSION, REASON_NULL

getExpression

public java.lang.String getExpression()
Return the string representation of a metric expression that has caused the MetricExpressionParserException while it has been parsed.

Returns:
String the malformed string representation of a metric expression


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.