|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hippoecm.hst.component.support.spring.util.MetadataReaderClasspathResourceScanner
public class MetadataReaderClasspathResourceScanner
MetadataReaderClasspathResourceScanner
This class implements ClasspathResourceScanner
by leveraging Spring Framework components.
This class can be used in either way, defining a bean in the application context
or invoking the static newInstance(ServletContext)
method.
The former is convenient for the applications which already use Spring Framework,
while the latter is convenient for the applications which don't use Spring Framework.
Constructor Summary | |
---|---|
MetadataReaderClasspathResourceScanner()
|
Method Summary | |
---|---|
static MetadataReaderClasspathResourceScanner |
newInstance(javax.servlet.ServletContext servletContext)
Create an instance with setting the proper ResourceLoader object. |
Set<String> |
scanClassNamesAnnotatedBy(Class<? extends Annotation> annotationType,
boolean matchSuperClass,
String... locationPatterns)
Scans classpath from the location specified by locationPatterns
for all class names which annotates the speified annotationType . |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetadataReaderClasspathResourceScanner()
Method Detail |
---|
public static MetadataReaderClasspathResourceScanner newInstance(javax.servlet.ServletContext servletContext)
ResourceLoader
object.
If there's any web application context already, then the existing web application context is used
as ResourceLoader
. Otherwise, it creates a ResourceLoader
internally for convenience.
servletContext
-
public Set<String> scanClassNamesAnnotatedBy(Class<? extends Annotation> annotationType, boolean matchSuperClass, String... locationPatterns)
ClasspathResourceScanner
locationPatterns
for all class names which annotates the speified annotationType
.
Note: An implementation is recommended to support locationPattern
with classpath*:
prefix at least
like the following example:
scanClassNamesAnnotatedBy
in interface ClasspathResourceScanner
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |