OSGi™ Service Platform
Release 4 Version 4.1

org.osgi.framework
Class InvalidSyntaxException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.osgi.framework.InvalidSyntaxException
All Implemented Interfaces:
java.io.Serializable

public class InvalidSyntaxException
extends java.lang.Exception

A Framework exception used to indicate that a filter string has an invalid syntax.

An InvalidSyntaxException object indicates that a filter string parameter has an invalid syntax and cannot be parsed. See Filter for a description of the filter string syntax.

This exception is updated to conform to the general purpose exception chaining mechanism.

See Also:
Serialized Form

Constructor Summary
InvalidSyntaxException(java.lang.String msg, java.lang.String filter)
          Creates an exception of type InvalidSyntaxException.
InvalidSyntaxException(java.lang.String msg, java.lang.String filter, java.lang.Throwable cause)
          Creates an exception of type InvalidSyntaxException.
 
Method Summary
 java.lang.Throwable getCause()
          Returns the cause of this exception or null if no cause was specified when this exception was created.
 java.lang.String getFilter()
          Returns the filter string that generated the InvalidSyntaxException object.
 java.lang.Throwable initCause(java.lang.Throwable cause)
          The cause of this exception can only be set when constructed.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvalidSyntaxException

public InvalidSyntaxException(java.lang.String msg,
                              java.lang.String filter)
Creates an exception of type InvalidSyntaxException.

This method creates an InvalidSyntaxException object with the specified message and the filter string which generated the exception.

Parameters:
msg - The message.
filter - The invalid filter string.

InvalidSyntaxException

public InvalidSyntaxException(java.lang.String msg,
                              java.lang.String filter,
                              java.lang.Throwable cause)
Creates an exception of type InvalidSyntaxException.

This method creates an InvalidSyntaxException object with the specified message and the filter string which generated the exception.

Parameters:
msg - The message.
filter - The invalid filter string.
cause - The cause of this exception.
Since:
1.3
Method Detail

getFilter

public java.lang.String getFilter()
Returns the filter string that generated the InvalidSyntaxException object.

Returns:
The invalid filter string.
See Also:
BundleContext.getServiceReferences(java.lang.String, java.lang.String), BundleContext.addServiceListener(ServiceListener,String)

getCause

public java.lang.Throwable getCause()
Returns the cause of this exception or null if no cause was specified when this exception was created.

Returns:
The cause of this exception or null if no cause was specified.
Since:
1.3

initCause

public java.lang.Throwable initCause(java.lang.Throwable cause)
The cause of this exception can only be set when constructed.

Parameters:
cause - Cause of the exception.
Returns:
This object.
Throws:
java.lang.IllegalStateException - This method will always throw an IllegalStateException since the cause of this exception can only be set when constructed.
Since:
1.3

OSGi™ Service Platform
Release 4 Version 4.1

Copyright © OSGi Alliance (2000, 2007). All Rights Reserved. Licensed under the OSGi Specification License, Version 1.0