generateDefaultLocations

Generate the default classpath resource locations array based on the
supplied class.

For example, if the supplied class is com.example.MyTest,
the generated locations will contain a single string with a value of
"classpath:/com/example/MyTest<suffix>",
where <suffix> is the value of the
resource suffix string.

As of Spring 3.1, the implementation of this method adheres to the
contract defined in the SmartContextLoader SPI. Specifically,
this method will preemptively verify that the generated default
location actually exists. If it does not exist, this method will log a
warning and return an empty array.

Subclasses can override this method to implement a different
default location generation strategy.

modifyLocations

Generate a modified version of the supplied locations array and return it.

A plain path — for example, "context.xml" — will
be treated as a classpath resource that is relative to the package in which
the specified class is defined. A path starting with a slash is treated
as an absolute classpath location, for example:
"/org/springframework/whatever/foo.xml". A path which
references a URL (e.g., a path prefixed with
classpath:,
file:, http:,
etc.) will be added to the results unchanged.

Subclasses can override this method to implement a different
location modification strategy.

Parameters:

clazz - the class with which the locations are associated

locations - the resource locations to be modified

Returns:

an array of modified application context resource locations

Since:

2.5

isGenerateDefaultLocations

As of Spring 3.1, the semantics of this method have been overloaded
to include detection of either default resource locations or default
configuration classes. Consequently, this method can also be used to
determine whether or not default configuration classes should be
detected if the classes present in the
configuration attributes supplied
to processContextConfiguration(ContextConfigurationAttributes)
are null or empty.