OSGi™ Core
Release 6

org.osgi.framework
Class InvalidSyntaxException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.osgi.framework.InvalidSyntaxException
All Implemented Interfaces:
Serializable

public class InvalidSyntaxException
extends 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 conforms to the general purpose exception chaining mechanism.

See Also:
Serialized Form

Constructor Summary
InvalidSyntaxException(String msg, String filter)
          Creates an exception of type InvalidSyntaxException.
InvalidSyntaxException(String msg, String filter, Throwable cause)
          Creates an exception of type InvalidSyntaxException.
 
Method Summary
 Throwable getCause()
          Returns the cause of this exception or null if no cause was set.
 String getFilter()
          Returns the filter string that generated the InvalidSyntaxException object.
 Throwable initCause(Throwable cause)
          Initializes the cause of this exception to the specified value.
 
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(String msg,
                              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(String msg,
                              String filter,
                              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 String getFilter()
Returns the filter string that generated the InvalidSyntaxException object.

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

getCause

public Throwable getCause()
Returns the cause of this exception or null if no cause was set.

Overrides:
getCause in class Throwable
Returns:
The cause of this exception or null if no cause was set.
Since:
1.3

initCause

public Throwable initCause(Throwable cause)
Initializes the cause of this exception to the specified value.

Overrides:
initCause in class Throwable
Parameters:
cause - The cause of this exception.
Returns:
This exception.
Throws:
IllegalArgumentException - If the specified cause is this exception.
IllegalStateException - If the cause of this exception has already been set.
Since:
1.3

OSGi™ Core
Release 6

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