org.apache.woden.xpointer
Class InvalidXPointerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.woden.xpointer.InvalidXPointerException
All Implemented Interfaces:
java.io.Serializable

public class InvalidXPointerException
extends java.lang.Exception

This class represents Exceptions that can happen during parsing an XPointer Expression.

Author:
Dan Harvey
See Also:
Serialized Form

Constructor Summary
InvalidXPointerException(java.lang.String message, java.lang.String fragment)
          Constructs a InvalidXPointerException with a message and fragment properties.
InvalidXPointerException(java.lang.String message, java.lang.String fragment, int startChar, int endChar)
          Constructs a InvalidXPointerException with a message and fragment properties, and index to the cause inside the fragment.
InvalidXPointerException(java.lang.String message, java.lang.String fragment, int startChar, int endChar, java.lang.Throwable cause)
          Constructs a InvalidXPointerException with a message and fragment properties, and index to the cause inside the fragment.
InvalidXPointerException(java.lang.String message, java.lang.String fragment, java.lang.Throwable cause)
          Constructs a InvalidXPointerException with a message and fragment properties.
 
Method Summary
 java.lang.Integer getEndChar()
          Returns the endChar index of the cause of this error in the fragment.
 java.lang.String getFragment()
          Returns the fragment String stored inside this exception.
 java.lang.Integer getStartChar()
          Returns the startChar index of the cause of this error in the fragment.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvalidXPointerException

public InvalidXPointerException(java.lang.String message,
                                java.lang.String fragment)
Constructs a InvalidXPointerException with a message and fragment properties.

Parameters:
message - a String message of error.
fragment - a String fragment of the cause.

InvalidXPointerException

public InvalidXPointerException(java.lang.String message,
                                java.lang.String fragment,
                                java.lang.Throwable cause)
Constructs a InvalidXPointerException with a message and fragment properties. It also has a Throwable argument to support exception chaining.

Parameters:
message - a String message of error.
fragment - a String fragment of the cause of the error.
cause - a Throwable which caused this exception to be thrown.

InvalidXPointerException

public InvalidXPointerException(java.lang.String message,
                                java.lang.String fragment,
                                int startChar,
                                int endChar)
Constructs a InvalidXPointerException with a message and fragment properties, and index to the cause inside the fragment.

Parameters:
message - a String message of error.
fragment - a String fragment of the cause of the error.
startChar - a int char index to the start of the cause in the fragment.
endChar - a int char index to the end of the cause in the fragment.

InvalidXPointerException

public InvalidXPointerException(java.lang.String message,
                                java.lang.String fragment,
                                int startChar,
                                int endChar,
                                java.lang.Throwable cause)
Constructs a InvalidXPointerException with a message and fragment properties, and index to the cause inside the fragment. It also has a Throwable argument to support exception chaining.

Parameters:
message - a String message of error.
fragment - a String fragment of the cause of the error.
startChar - an int char index to the start of the cause in the fragment.
endChar - an int char index to the end of the cause in the fragment.
cause - a Throwable which caused the exception to be thrown.
Method Detail

getFragment

public java.lang.String getFragment()
Returns the fragment String stored inside this exception.

Returns:
a String fragment.

getStartChar

public java.lang.Integer getStartChar()
Returns the startChar index of the cause of this error in the fragment.

Returns:
an Integer of the startChar index if one exists, otherwise null.

getEndChar

public java.lang.Integer getEndChar()
Returns the endChar index of the cause of this error in the fragment.

Returns:
an Integer of the startChar index if one exists, otherwise null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.