public class Classpath
extends java.lang.Object
Constructor and Description |
---|
Classpath() |
Modifier and Type | Method and Description |
---|---|
static org.reflections.util.ConfigurationBuilder |
getReflectionsConfiguration(java.lang.String packageName,
java.lang.ClassLoader classLoader)
Create
Configuration object for given package name and class loader. |
static java.util.Set<java.lang.String> |
getTypes(Application app,
java.lang.String packageName)
Scans the application classloader to retrieve all types within a specific package.
|
static java.util.Set<java.lang.String> |
getTypes(Environment env,
java.lang.String packageName)
Scans the environment classloader to retrieve all types within a specific package.
|
static java.util.Set<java.lang.Class<?>> |
getTypesAnnotatedWith(Application app,
java.lang.String packageName,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Scans the application classloader to retrieve all types annotated with a specific annotation.
|
static java.util.Set<java.lang.Class<?>> |
getTypesAnnotatedWith(Environment env,
java.lang.String packageName,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Scans the environment classloader to retrieve all types annotated with a specific annotation.
|
public static java.util.Set<java.lang.String> getTypes(Application app, java.lang.String packageName)
This method is useful for some plug-ins, for example the EBean plugin will automatically detect all types within the models package.
Note that it is better to specify a very specific package to avoid expensive searches.
packageName
- the root package to scanpublic static java.util.Set<java.lang.Class<?>> getTypesAnnotatedWith(Application app, java.lang.String packageName, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
This method is useful for some plug-ins, for example the EBean plugin will automatically detect all types
annotated with @javax.persistance.Entity
.
Note that it is better to specify a very specific package to avoid expensive searches.
packageName
- the root package to scanannotation
- annotation classpublic static java.util.Set<java.lang.String> getTypes(Environment env, java.lang.String packageName)
This method is useful for some plug-ins, for example the EBean plugin will automatically detect all types within the models package.
Note that it is better to specify a very specific package to avoid expensive searches.
packageName
- the root package to scanpublic static java.util.Set<java.lang.Class<?>> getTypesAnnotatedWith(Environment env, java.lang.String packageName, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
This method is useful for some plug-ins, for example the EBean plugin will automatically detect all types
annotated with @javax.persistance.Entity
.
Note that it is better to specify a very specific package to avoid expensive searches.
packageName
- the root package to scanannotation
- annotation classpublic static org.reflections.util.ConfigurationBuilder getReflectionsConfiguration(java.lang.String packageName, java.lang.ClassLoader classLoader)
Configuration
object for given package name and class loader.packageName
- the root package to scanclassLoader
- class loader to be used in reflections