|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjodd.io.findfile.ClassFinder
jodd.petite.config.AutomagicPetiteConfigurator
public class AutomagicPetiteConfigurator
Auto-magically configures Petite container by analyzing the classpath.
Scans all classes on classpath and in jar files, and scans for PetiteBean
annotation (not by loading the class!). If annotation is founded, class will be loaded and
registered as Petite bean.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jodd.io.findfile.ClassFinder |
|---|
ClassFinder.EntryData |
| Field Summary | |
|---|---|
protected PetiteContainer |
container
|
protected long |
elapsed
|
protected byte[] |
petiteBeanAnnotationBytes
|
| Fields inherited from class jodd.io.findfile.ClassFinder |
|---|
excludedEntries, excludedJars, ignoreException, includedEntries, includedJars, includeResources, systemJars |
| Constructor Summary | |
|---|---|
AutomagicPetiteConfigurator()
|
|
| Method Summary | |
|---|---|
void |
configure(PetiteContainer petiteContainer)
Configures PetiteContainer with default class path. |
void |
configure(PetiteContainer petiteContainer,
File[] classpath)
Configures PetiteContainer with specified class path. |
long |
getElapsed()
Return elapsed number of milliseconds for configuration. |
protected Class |
loadClass(String className)
Loads class from classname using default classloader. |
protected void |
onEntry(ClassFinder.EntryData entryData)
Scans all classes and registers only those annotated with PetiteBean. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final byte[] petiteBeanAnnotationBytes
protected PetiteContainer container
protected long elapsed
| Constructor Detail |
|---|
public AutomagicPetiteConfigurator()
| Method Detail |
|---|
public long getElapsed()
public void configure(PetiteContainer petiteContainer,
File[] classpath)
PetiteContainer with specified class path.
configure(jodd.petite.PetiteContainer)public void configure(PetiteContainer petiteContainer)
PetiteContainer with default class path.
configure in interface PetiteConfiguratorconfigure(jodd.petite.PetiteContainer, java.io.File[])protected void onEntry(ClassFinder.EntryData entryData)
PetiteBean.
Because of performance purposes, classes are not dynamically loaded; instead, their
file content is examined.
onEntry in class ClassFinder
protected Class loadClass(String className)
throws ClassNotFoundException
ClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||