org.geotools.factory
Class RecursiveSearchException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.geotools.factory.FactoryRegistryException
org.geotools.factory.RecursiveSearchException
- All Implemented Interfaces:
- java.io.Serializable
public class RecursiveSearchException
- extends FactoryRegistryException
Thrown when FactoryRegistry
is invoked recursively for the same category. This exception
is often the result of a programming error. It happen typically when an implementation of some
FooFactory
interface queries in their constructor, directly or indirectly,
getServiceProvider
for the same category (namely
FooFactory.class
). Factories implemented as wrappers around other factories of the same
kind are the most likely to fall in this canvas. If this RecursiveSearchException
was not throw, the application would typically dies with a StackOverflowError
.
A workaround for this exception is to invoke getServiceProvider
outside the constuctor,
when a method first need it.
- Since:
- 2.3
- Version:
- $Id: RecursiveSearchException.java 30640 2008-06-12 17:34:32Z acuster $
- Author:
- Martin Desruisseaux
- See Also:
- Serialized Form
Constructor Summary |
RecursiveSearchException(java.lang.Class<?> category)
Creates a new exception with a default message determined from the specified category. |
RecursiveSearchException(java.lang.String message)
Creates a new exception with the specified detail message. |
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 |
RecursiveSearchException
public RecursiveSearchException(java.lang.Class<?> category)
- Creates a new exception with a default message determined from the specified category.
RecursiveSearchException
public RecursiveSearchException(java.lang.String message)
- Creates a new exception with the specified detail message.
Copyright © 1996-2010 Geotools. All Rights Reserved.