Class ServiceLocatorTestRule<T>
- Type Parameters:
T
- the type of JUnit test thisServiceLocatorTestRule
is related to; consider making it an instance ofBinder
- All Implemented Interfaces:
Binder
,org.junit.rules.TestRule
ExternalResource
(and a Binder
) that sets up and
tears down an HK2 ServiceLocator
on a per-test-class or
per-test-method basis.- Since:
- 2.4.0-b33
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Anenum
describing possibleServiceLocator
isolation levels for JUnit tests.private static final class
A very, very special-purposeClassVisitorImpl
suitable only for use by theServiceLocatorTestRule
class to determine efficiently whether a givenClass
is annotated withService
or not. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.junit.runner.Description
TheDescription
describing the JUnit test method currently executing.private final ServiceLocatorTestRule.ServiceLocatorIsolation
TheServiceLocatorTestRule.ServiceLocatorIsolation
designating whether theServiceLocator
associated with thisServiceLocatorTestRule
is set up for each test method or shared among them.private ServiceLocator
TheServiceLocator
in effect for the currently executing JUnit test method.private final T
The test instance instantiating thisServiceLocatorTestRule
.private final boolean
Aboolean
indicating whether thisServiceLocatorTestRule
is configured to output additional information toSystem.out
. -
Constructor Summary
ConstructorsConstructorDescriptionServiceLocatorTestRule
(T test) Creates a newServiceLocatorTestRule
on behalf of the supplied JUnit test inServiceLocatorTestRule.ServiceLocatorIsolation.PER_TEST
isolation in non-verbose mode.ServiceLocatorTestRule
(T test, boolean verbose) Creates a newServiceLocatorTestRule
on behalf of the supplied JUnit test inServiceLocatorTestRule.ServiceLocatorIsolation.PER_TEST
isolation with the supplied verbosity.ServiceLocatorTestRule
(T test, ServiceLocatorTestRule.ServiceLocatorIsolation isolation) Creates a newServiceLocatorTestRule
on behalf of the supplied JUnit test in the givenServiceLocatorTestRule.ServiceLocatorIsolation
in non-verbose mode.ServiceLocatorTestRule
(T test, ServiceLocatorTestRule.ServiceLocatorIsolation isolation, boolean verbose) Creates a newServiceLocatorTestRule
on behalf of the supplied JUnit test in the givenServiceLocatorTestRule.ServiceLocatorIsolation
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
after()
Shuts down and cleans up theServiceLocator
created by thisServiceLocatorTestRule
.org.junit.runners.model.Statement
apply
(org.junit.runners.model.Statement statement, org.junit.runner.Description description) Overrides theExternalResource.apply(Statement, Description)
method to save the suppliedDescription
so that other methods in this class can refer to it.void
before()
When necessary, calls thecreateServiceLocator(Description)
,configureServiceLocator(ServiceLocator, Description)
andperformDependencyInjection(ServiceLocator, Object)
methods in order to set up aServiceLocator
appropriate for the current JUnit test.void
bind
(DynamicConfiguration dynamicConfiguration) Called at the appropriate time by theconfigureServiceLocator(ServiceLocator, Description)
method in case subclasses wish to add services to theServiceLocator
being configured.private static final void
bind
(DynamicConfiguration configuration, BufferedReader reader) Reads the HK2 locator file represented by the suppliedBufferedReader
and binds theDescriptor
s it represents.private final void
bind
(DynamicConfiguration configuration, AnnotatedElement element) Retrieves anyAnnotation
s found on the suppliedAnnotatedElement
and calls thebind(DynamicConfiguration, Collection)
method supplying them as the second parameter.private static final void
bind
(DynamicConfiguration configuration, String locatorResourceName) Using the contextClassLoader
, gets all classpath resources with the suppliedlocatorResourceName
, and iterates through them, calling thebind(DynamicConfiguration, URL)
method for each one.private static final void
bind
(DynamicConfiguration configuration, URL locatorResource) Opens anInputStream
to the suppliedURL
, wraps aBufferedReader
around it, and calls thebind(DynamicConfiguration, BufferedReader)
method.private final void
bind
(DynamicConfiguration configuration, Collection<? extends Annotation> annotations) Recursively examines theAnnotation
s supplied looking for instances of theClasses
,InhabitantFiles
andPackages
annotations, and, using the binding methods on the suppliedDynamicConfiguration
bindsDescriptor
s for those "reachable" classes into the configuration.private final void
bind
(DynamicConfiguration configuration, Set<String> packageNames) Binds allClass
es "reachable" from the supplied packages.private final void
bind
(DynamicConfiguration configuration, Classes classes) private static final void
bind
(DynamicConfiguration configuration, InhabitantFiles inhabitantFiles) Gathers all classpath resource names found in the suppliedInhabitantFiles
annotation representing HK2 locator files and calls thebind(DynamicConfiguration, String)
method for each such entry found.private final void
bind
(DynamicConfiguration configuration, Packages packages) protected void
configureServiceLocator
(ServiceLocator serviceLocator, org.junit.runner.Description testDescription) Configures the suppliedServiceLocator
for use by the test described by the suppliedDescription
.protected ServiceLocator
createServiceLocator
(org.junit.runner.Description testDescription) Creates and returns aServiceLocator
suitable for the JUnit test described by the suppliedDescription
.getClassesFromDirectory
(Set<String> packageNames, File directory, boolean verbose) Given aSet
of package names and aFile
designating an existing directory in the classpath that can be read, returns aSet
ofService
-annotatedClass
es that can be found there that belong to one of the supplied package names.getClassesFromPackages
(Set<String> packageNames) getClassesFromZipFile
(Set<String> packageNames, ZipFile zipFile) protected String
Returns aString
representing the classpath to use to search for classes.private final org.junit.runner.Description
Returns theDescription
describing the currently executing JUnit test method.Returns theServiceLocatorTestRule.ServiceLocatorIsolation
for thisServiceLocatorTestRule
.protected String
getServiceLocatorName
(org.junit.runner.Description testDescription) Returns a name for aServiceLocator
that is appropriate for the suppliedDescription
.private static final boolean
isBlacklisted
(Annotation annotation) Returnstrue
if the suppliedAnnotation
isnull
or designates an annotation type that should be excluded from recursive annotation scanning performed by thebind(DynamicConfiguration, AnnotatedElement)
method.private static final boolean
isBlacklisted
(Class<? extends Annotation> c) Returnstrue
if the suppliedClass
isnull
or designates an annotation type that should be excluded from recursive annotation scanning performed by thebind(DynamicConfiguration, AnnotatedElement)
method.final boolean
protected void
performDependencyInjection
(ServiceLocator serviceLocator, T test) Performs HK2 dependency injection on thisServiceLocatorTestRule
and the supplied test instance, using the suppliedServiceLocator
as needed.void
shutdownAndDestroyServiceLocator
(org.junit.runner.Description testDescription) Blindly calls theServiceLocator.shutdown()
andServiceLocatorFactory.destroy(ServiceLocator)
methods on thisServiceLocatorTestRule
's associatedServiceLocator
if it is discovered to be non-null
.
-
Field Details
-
test
The test instance instantiating thisServiceLocatorTestRule
.This field is never
null
. -
isolation
TheServiceLocatorTestRule.ServiceLocatorIsolation
designating whether theServiceLocator
associated with thisServiceLocatorTestRule
is set up for each test method or shared among them.This field is never
null
. -
verbose
private final boolean verboseAboolean
indicating whether thisServiceLocatorTestRule
is configured to output additional information toSystem.out
.- See Also:
-
description
private org.junit.runner.Description descriptionTheDescription
describing the JUnit test method currently executing.This field may be
null
.- See Also:
-
serviceLocator
TheServiceLocator
in effect for the currently executing JUnit test method.This field may be
null
.
-
-
Constructor Details
-
ServiceLocatorTestRule
Creates a newServiceLocatorTestRule
on behalf of the supplied JUnit test inServiceLocatorTestRule.ServiceLocatorIsolation.PER_TEST
isolation in non-verbose mode.- Parameters:
test
- the JUnit test; must not benull
- Throws:
AssertionError
- iftest
isnull
- See Also:
-
ServiceLocatorTestRule
Creates a newServiceLocatorTestRule
on behalf of the supplied JUnit test inServiceLocatorTestRule.ServiceLocatorIsolation.PER_TEST
isolation with the supplied verbosity.- Parameters:
test
- the JUnit test; must not benull
verbose
- whether thisServiceLocatorTestRule
should output additional information toSystem.out
- Throws:
AssertionError
- iftest
isnull
- See Also:
-
ServiceLocatorTestRule
Creates a newServiceLocatorTestRule
on behalf of the supplied JUnit test in the givenServiceLocatorTestRule.ServiceLocatorIsolation
in non-verbose mode.- Parameters:
test
- the JUnit test; must not benull
isolation
- theServiceLocatorTestRule.ServiceLocatorIsolation
; ifnull
thenServiceLocatorTestRule.ServiceLocatorIsolation.PER_TEST
will be used instead- Throws:
AssertionError
- iftest
isnull
- See Also:
-
ServiceLocatorTestRule
public ServiceLocatorTestRule(T test, ServiceLocatorTestRule.ServiceLocatorIsolation isolation, boolean verbose) Creates a newServiceLocatorTestRule
on behalf of the supplied JUnit test in the givenServiceLocatorTestRule.ServiceLocatorIsolation
.- Parameters:
test
- the JUnit test; must not benull
isolation
- theServiceLocatorTestRule.ServiceLocatorIsolation
; ifnull
thenServiceLocatorTestRule.ServiceLocatorIsolation.PER_TEST
will be used insteadverbose
- whether thisServiceLocatorTestRule
should output additional information toSystem.out
- Throws:
AssertionError
- iftest
isnull
-
-
Method Details
-
getServiceLocatorIsolation
Returns theServiceLocatorTestRule.ServiceLocatorIsolation
for thisServiceLocatorTestRule
.This method never returns
null
.- Returns:
- the
ServiceLocatorTestRule.ServiceLocatorIsolation
for thisServiceLocatorTestRule
; nevernull
-
getDescription
private final org.junit.runner.Description getDescription()Returns theDescription
describing the currently executing JUnit test method.This method may return
null
.- Returns:
- the
Description
describing the currently executing JUnit test method, ornull
-
isVerbose
public final boolean isVerbose()- Returns:
true
if thisServiceLocatorTestRule
should be verbose;false
otherwise- See Also:
-
before
When necessary, calls thecreateServiceLocator(Description)
,configureServiceLocator(ServiceLocator, Description)
andperformDependencyInjection(ServiceLocator, Object)
methods in order to set up aServiceLocator
appropriate for the current JUnit test.- Overrides:
before
in classorg.junit.rules.ExternalResource
- Throws:
IOException
- if theconfigureServiceLocator(ServiceLocator, Description)
method threw anIOException
- See Also:
-
configureServiceLocator
protected void configureServiceLocator(ServiceLocator serviceLocator, org.junit.runner.Description testDescription) throws IOException Configures the suppliedServiceLocator
for use by the test described by the suppliedDescription
.This implementation:
- Adds the
ErrorServiceImpl
class to the suppliedServiceLocator
so that exceptions will be thrown from tests - Removes, via
DynamicConfiguration.addUnbindFilter(Filter)
, allDescriptor
s that haveDescription.class
as one of their contracts - Adds a constant
descriptor in
Singleton
scope with a name equal to the return value of theDescription.getDisplayName()
method for the suppliedDescription
so that the current test can inject theDescription
for the current method if it wishes - Adds any classes found in an optional
Classes
annotation decorating the test class—if they are assignable toFactory.class
then they are added as factories - Adds any classes found in any packages listed in an optional
Packages
annotation decorating the test class, provided they are annotated withService
- Reads any locator files listed in an optional
InhabitantFiles
annotation decorating the test class and adds the services listed therein - Calls the
bind(DynamicConfiguration)
method - Calls the
Binder.bind(DynamicConfiguration)
method on the test if it is in fact an instance ofBinder
- Parameters:
serviceLocator
- theServiceLocator
to configure; must not benull
testDescription
- theDescription
describing the particular test being run; must not benull
- Throws:
AssertionError
- if eitherserviceLocator
ortestDescription
isnull
IOException
- if there was an error looking for classes in packages or finding or reading locator files
- Adds the
-
bind
Called at the appropriate time by theconfigureServiceLocator(ServiceLocator, Description)
method in case subclasses wish to add services to theServiceLocator
being configured.Overrides of this method must not invoke the
DynamicConfiguration.commit()
method.The default implementation of this method does nothing.
- Specified by:
bind
in interfaceBinder
- Parameters:
dynamicConfiguration
- theDynamicConfiguration
to manipulate in order to add or remove services from theServiceLocator
being configured; must not benull
-
getClassesFromPackages
Given aSet
of package names, returns aSet
ofService
-annotatedClass
es found in those packages, whether they are located inZipFile
s or directories on the classpath.This method never returns
null
.- Parameters:
packageNames
- the names of packages to search; may benull
in which case an emptySet
will be returned- Returns:
- a non-
null
Set
ofClass
es - Throws:
IOException
- if there was any kind of error during package searching or file reading- See Also:
-
getClassesFromZipFile
private final Set<Class<?>> getClassesFromZipFile(Set<String> packageNames, ZipFile zipFile) throws IOException Given aZipFile
(which is usually a.jar
file) containing class files and aSet
of package names, searches it to findService
-annotatedClass
es inside it that belong to one of the supplied package names and returns aSet
of suchClass
es.- Parameters:
packageNames
- aSet
of package names; may benull
in which case an emptySet
will be returnedzipFile
- aZipFile
hopefully containing class files; may benull
in which case an emptySet
will be returned- Returns:
- a non-
null
Set
ofService
-annotatedClass
es - Throws:
IOException
- if an error occurred reading theZipFile
-
getClasspath
Returns aString
representing the classpath to use to search for classes.This method never returns
null
.Overrides of this method are permitted to return
null
.The default implementation of this method returns the value of the
java.class.path
system property, or in the almost certainly catastrophic case where this is not set, the empty string.- Returns:
- a
String
representing the classpath, ornull
-
bind
private final void bind(DynamicConfiguration configuration, AnnotatedElement element) throws IOException Retrieves anyAnnotation
s found on the suppliedAnnotatedElement
and calls thebind(DynamicConfiguration, Collection)
method supplying them as the second parameter.- Parameters:
configuration
- aDynamicConfiguration
that will perform the binding; must not benull
element
- theAnnotatedElement
that has annotations; may benull
in which case no action is performed- Throws:
AssertionError
- ifconfiguration
isnull
IOException
- if there was a problem reading class or locator files- See Also:
-
bind
private final void bind(DynamicConfiguration configuration, Collection<? extends Annotation> annotations) throws IOException Recursively examines theAnnotation
s supplied looking for instances of theClasses
,InhabitantFiles
andPackages
annotations, and, using the binding methods on the suppliedDynamicConfiguration
bindsDescriptor
s for those "reachable" classes into the configuration.Recursively means that a user-defined
Annotation
might itself be annotated withClasses
; in such a case theClasses
annotation's contents will be found and processed. This effectively allows stereotyping theClasses
,InhabitantFiles
andPackages
annotations.- Parameters:
configuration
- aDynamicConfiguration
that will perform the binding; must not benull
annotations
- aCollection
ofAnnotation
s; may benull
in which case no action will be performed- Throws:
AssertionError
- ifconfiguration
isnull
IOException
- if there was a problem reading class or locator files- See Also:
-
bind
Binds allClass
es "reachable" from the suppliedClasses
annotation.Each
Class
found as a member of the return value of theClasses.value()
method is bound (even if it is an implementation ofFactory
) and in turn is examined forAnnotation
s on itself.- Parameters:
configuration
- aDynamicConfiguration
that will perform the binding; must not benull
classes
- aClasses
; may benull
in which case no action will be performed- Throws:
AssertionError
- ifconfiguration
isnull
IOException
- if there was a problem reading class files or locator files- See Also:
-
bind
Binds allClass
es "reachable" from packages described by the suppliedPackages
annotation.This method calls the
bind(DynamicConfiguration, Set)
method, passing it aSet
formed from the suppliedPackages
annotation's list of package names as the second parameter.- Parameters:
configuration
- aDynamicConfiguration
that will perform the binding; must not benull
packages
- aPackages
; may benull
in which case no action will be performed- Throws:
AssertionError
- ifconfiguration
isnull
IOException
- if there was a problem reading class files or locator files- See Also:
-
bind
private final void bind(DynamicConfiguration configuration, Set<String> packageNames) throws IOException Binds allClass
es "reachable" from the supplied packages.This method calls the
getClassesFromPackages(Set)
method, and, for eachClass
returned, if it is an implementation ofFactory
then twoDescriptor
s are added to theDynamicConfiguration
in the form of aFactoryDescriptors
addition by way of theDynamicConfiguration.addActiveFactoryDescriptor(Class)
method, or, if not, then a singleDescriptor
is added to theDynamicConfiguration
.- Parameters:
configuration
- aDynamicConfiguration
that will perform the binding; must not benull
packageNames
- aSet
of package names; may benull
in which case no action will be performed- Throws:
AssertionError
- ifconfiguration
isnull
IOException
- if there was a problem reading class files or locator files- See Also:
-
performDependencyInjection
Performs HK2 dependency injection on thisServiceLocatorTestRule
and the supplied test instance, using the suppliedServiceLocator
as needed.The default implementation of this method does the following:
- Calls
ServiceLocator.inject(Object)
on the suppliedServiceLocator
, if it is non-null
, passing it thisServiceLocatorTestRule
- Calls
ServiceLocator.postConstruct(Object)
on the suppliedServiceLocator
, if it is non-null
, passing it thisServiceLocatorTestRule
- Calls
ServiceLocator.inject(Object)
on the suppliedServiceLocator
, if it is non-null
, passing it the suppliedtest
instance, if it is non-null
- Calls
ServiceLocator.postConstruct(Object)
on the suppliedServiceLocator
, if it is non-null
, passing it the suppliedtest
instance, if it is non-null
This method is guaranteed to be called after the
configureServiceLocator(ServiceLocator, Description)
method with the sameServiceLocator
.- Parameters:
serviceLocator
- theServiceLocator
to use to perform injection; may benull
in which case no action will be takentest
- the test instance to inject; may benull
- See Also:
- Calls
-
createServiceLocator
Creates and returns aServiceLocator
suitable for the JUnit test described by the suppliedDescription
.This method never returns
null
.Overrides of this method must not return
null
.- Parameters:
testDescription
- theDescription
describing the currently executing JUnit test; must not benull
- Returns:
- a non-
null
ServiceLocator
- Throws:
AssertionError
- iftestDescription
isnull
-
getServiceLocatorName
Returns a name for aServiceLocator
that is appropriate for the suppliedDescription
.This method never returns
null
.Overrides of this method must not return
null
.- Parameters:
testDescription
- theDescription
describing the currently executing JUnit test; must not benull
- Returns:
- a non-
null
String
that will be used as a name for aServiceLocator
- Throws:
AssertionError
- iftestDescription
isnull
, or if itsgetClassName()
method returnsnull
or if itsgetMethodName()
method returnsnull
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement statement, org.junit.runner.Description description) Overrides theExternalResource.apply(Statement, Description)
method to save the suppliedDescription
so that other methods in this class can refer to it.This method never returns
null
.Overrides of this method must not return
null
.- Specified by:
apply
in interfaceorg.junit.rules.TestRule
- Overrides:
apply
in classorg.junit.rules.ExternalResource
- Parameters:
statement
- theStatement
thisServiceLocatorTestRule
will modify; passed unchanged to theExternalResource.apply(Statement, Description)
methoddescription
- theDescription
describing the current JUnit test; must not benull
; passed unchanged to theExternalResource.apply(Statement, Description)
method- Returns:
- the return value of the
ExternalResource.apply(Statement, Description)
method; nevernull
-
after
public void after()Shuts down and cleans up theServiceLocator
created by thisServiceLocatorTestRule
.This method performs the following actions in order:
- Calls the
ServiceLocator.preDestroy(Object)
method on the existingServiceLocator
, passing it the test instance supplied at construction time - Calls the
ServiceLocator.preDestroy(Object)
method on the existingServiceLocator
, passing it thisServiceLocatorTestRule
- If the
ServiceLocator
isolation level isPER_TEST
, calls theshutdownAndDestroyServiceLocator(Description)
method with aDescription
instance that describes the JUnit test method that just executed
- Overrides:
after
in classorg.junit.rules.ExternalResource
- See Also:
- Calls the
-
shutdownAndDestroyServiceLocator
public void shutdownAndDestroyServiceLocator(org.junit.runner.Description testDescription) Blindly calls theServiceLocator.shutdown()
andServiceLocatorFactory.destroy(ServiceLocator)
methods on thisServiceLocatorTestRule
's associatedServiceLocator
if it is discovered to be non-null
.- Parameters:
testDescription
- aDescription
describing the currently executing JUnit test, if any; ignored by this method's default implementation; may benull
-
getClassesFromDirectory
private static final Set<Class<?>> getClassesFromDirectory(Set<String> packageNames, File directory, boolean verbose) throws IOException Given aSet
of package names and aFile
designating an existing directory in the classpath that can be read, returns aSet
ofService
-annotatedClass
es that can be found there that belong to one of the supplied package names.This method never returns
null
.- Parameters:
packageNames
- aSet
of package names; may benull
in which case an emptySet
will be returneddirectory
- aFile
designating a directory; an emptySet
will be returned unless the directory so designated exists and is readableverbose
- whether additional information should be output- Returns:
- a non-
null
Set
ofService
-annotatedClass
es - Throws:
IOException
- if there was a problem reading files
-
isBlacklisted
Returnstrue
if the suppliedAnnotation
isnull
or designates an annotation type that should be excluded from recursive annotation scanning performed by thebind(DynamicConfiguration, AnnotatedElement)
method.- Parameters:
annotation
- theAnnotation
to consider; may benull
in which casetrue
will be returned- Returns:
true
if the suppliedAnnotation
isnull
or designates an annotation type that should be excluded from recursive annotation scanning performed by thebind(DynamicConfiguration, AnnotatedElement)
method- See Also:
-
isBlacklisted
Returnstrue
if the suppliedClass
isnull
or designates an annotation type that should be excluded from recursive annotation scanning performed by thebind(DynamicConfiguration, AnnotatedElement)
method.- Parameters:
c
- theClass
to consider; may benull
in which casetrue
will be returned- Returns:
true
if the suppliedClass
isnull
or designates an annotation type that should be excluded from recursive annotation scanning performed by thebind(DynamicConfiguration, AnnotatedElement)
method;false
otherwise
-
bind
private static final void bind(DynamicConfiguration configuration, InhabitantFiles inhabitantFiles) throws IOException Gathers all classpath resource names found in the suppliedInhabitantFiles
annotation representing HK2 locator files and calls thebind(DynamicConfiguration, String)
method for each such entry found.- Parameters:
configuration
- aDynamicConfiguration
that will perform the binding; must not benull
inhabitantFiles
- anInhabitantFiles
; may benull
in which case no action will be performed- Throws:
AssertionError
- ifconfiguration
isnull
IOException
- if there was a problem reading locator files- See Also:
-
bind
private static final void bind(DynamicConfiguration configuration, String locatorResourceName) throws IOException Using the contextClassLoader
, gets all classpath resources with the suppliedlocatorResourceName
, and iterates through them, calling thebind(DynamicConfiguration, URL)
method for each one.- Parameters:
configuration
- aDynamicConfiguration
that will perform the binding; must not benull
locatorResourceName
- the name of a classpath resource identifying one or more HK2 locator files; may benull
in which case no action will be performed- Throws:
AssertionError
- ifconfiguration
isnull
IOException
- if there was a problem reading locator files- See Also:
-
bind
private static final void bind(DynamicConfiguration configuration, URL locatorResource) throws IOException Opens anInputStream
to the suppliedURL
, wraps aBufferedReader
around it, and calls thebind(DynamicConfiguration, BufferedReader)
method.- Parameters:
configuration
- aDynamicConfiguration
that will perform the binding; must not benull
locatorResource
- aURL
to an HK2 locator resource; may benull
in which case no action will be taken- Throws:
AssertionError
- ifconfiguration
isnull
IOException
- if there was a problem reading locator files- See Also:
-
bind
private static final void bind(DynamicConfiguration configuration, BufferedReader reader) throws IOException Reads the HK2 locator file represented by the suppliedBufferedReader
and binds theDescriptor
s it represents.- Parameters:
configuration
- aDynamicConfiguration
that will perform the binding; must not benull
reader
- aBufferedReader
reading a stream of descriptor information as parseable by theDescriptorImpl.readObject(BufferedReader)
method; may benull
in which case no action will be performed- Throws:
AssertionError
- ifconfiguration
isnull
IOException
- if there was a problem reading locator files- See Also:
-