|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jodd.io.findfile.FindClass jodd.petite.config.AutomagicPetiteConfig
public class AutomagicPetiteConfig
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.
Field Summary | |
---|---|
protected PetiteContainer |
container
|
protected long |
elapsed
|
protected byte[] |
petiteBeanAnnotationBytes
|
Fields inherited from class jodd.io.findfile.FindClass |
---|
createInputStream, excludedJars, excludedPackages, includedJars, includedPackages |
Constructor Summary | |
---|---|
AutomagicPetiteConfig()
|
Method Summary | |
---|---|
void |
configure(PetiteContainer petiteContainer)
Configures PetiteContainer with default class path. |
void |
configure(PetiteContainer petiteContainer,
java.net.URL[] classpath)
Configures PetiteContainer with specified class path. |
long |
getElapsed()
Return elapsed number of milliseconds for configuration. |
protected java.lang.Class |
loadClass(java.lang.String className)
Loads class from classname using default classloader. |
protected void |
onClassName(java.lang.String className,
java.io.InputStream inputStream)
Scans all classes and registers only those annotated with PetiteBean . |
Methods inherited from class jodd.io.findfile.FindClass |
---|
getExcludedJars, getExcludedPackages, getIncludedJars, getIncludedPackages, scanClassName, scanClassPath, scanJarFile, scanUrl, setExcludedJars, setExcludedPackages, setIncludedJars, setIncludedPackages |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected byte[] petiteBeanAnnotationBytes
protected PetiteContainer container
protected long elapsed
Constructor Detail |
---|
public AutomagicPetiteConfig()
Method Detail |
---|
public long getElapsed()
public void configure(PetiteContainer petiteContainer, java.net.URL[] classpath)
PetiteContainer
with specified class path.
configure(jodd.petite.PetiteContainer)
public void configure(PetiteContainer petiteContainer)
PetiteContainer
with default class path.
configure
in interface PetiteConfig
configure(jodd.petite.PetiteContainer, java.net.URL[])
protected void onClassName(java.lang.String className, java.io.InputStream inputStream)
PetiteBean
.
Because of performance purposes, classes are not dynamically loaded; instead, their
file content is examined.
onClassName
in class jodd.io.findfile.FindClass
protected java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |