|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.servlet.sip.annotations.ClassFileScanner
public class ClassFileScanner
This class implement the logic to enumerate all class files in WEB-INF/classes and extract descriptor information. I am using this method because if I look directly in a classloader it would have loaded all libs includeing third party libs in WEB-INF/jar, and system libs. Parsing all these would be slow, so for now we will only look in WEB-INF/classes since it works. General TODO: Validation
| Constructor Summary | |
|---|---|
ClassFileScanner(java.lang.String docbase,
SipContext ctx)
|
|
| Method Summary | |
|---|---|
protected void |
_scan(java.io.File folder)
|
protected void |
analyzeClass(java.lang.String path)
|
protected SipApplication |
getApplicationAnnotation(java.lang.Package pack)
|
boolean |
isApplicationParsed()
Shows if there is SipApplication annotation parsed and thur we dont need to look at sip.xml to seearch descriptor info. |
protected void |
parseSipApplication(SipApplication appData,
java.lang.String packageName)
|
protected void |
processAnnotations(java.lang.Class clazz)
|
protected void |
processConcurrencyAnnotation(java.lang.Class clazz)
Check if the @ConcurrencyControl annotation is present in the package and if so process it |
protected void |
processListenerAnnotation(java.lang.Class<?> clazz)
|
protected void |
processServletAnnotation(java.lang.Class<?> clazz)
|
protected void |
processSipApplicationKeyAnnotation(java.lang.Class<?> clazz)
|
void |
scan()
Scan the application for annotations with the contextconfig classloader. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassFileScanner(java.lang.String docbase,
SipContext ctx)
| Method Detail |
|---|
public void scan()
throws AnnotationVerificationException
AnnotationVerificationException - thrown if some annotations doesn't follow the restrictions given by the annotation contract
protected void _scan(java.io.File folder)
throws AnnotationVerificationException
AnnotationVerificationException
protected void analyzeClass(java.lang.String path)
throws AnnotationVerificationException
AnnotationVerificationException
protected void processAnnotations(java.lang.Class clazz)
throws AnnotationVerificationException
AnnotationVerificationExceptionprotected void processListenerAnnotation(java.lang.Class<?> clazz)
protected void processSipApplicationKeyAnnotation(java.lang.Class<?> clazz)
throws AnnotationVerificationException
AnnotationVerificationExceptionprotected void processServletAnnotation(java.lang.Class<?> clazz)
protected void parseSipApplication(SipApplication appData,
java.lang.String packageName)
protected SipApplication getApplicationAnnotation(java.lang.Package pack)
protected void processConcurrencyAnnotation(java.lang.Class clazz)
clazz - the clazz to check for @ConcurrencyControl annotation - only its package will be checkedpublic boolean isApplicationParsed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||