Package org.codehaus.aspectwerkz.annotation.instrumentation.bcel

Examples of org.codehaus.aspectwerkz.annotation.instrumentation.bcel.BcelAttributeExtractor


     */
    public static synchronized AttributeExtractor getAttributeExtractor(final Class klass) {
        if (klass.isPrimitive() || klass.isArray() || klass.getName().startsWith("java.")) {
            return null;
        }
        BcelAttributeExtractor extractor;
        if ((extractor = (BcelAttributeExtractor)s_extractorCache.get(klass)) == null) {
            String className = klass.getName();
            try {
                ClassLoader loader = klass.getClassLoader();
                if (loader != null) {
                    extractor = new BcelAttributeExtractor();

                    // extractor = new AsmAttributeExtractor();
                    extractor.initialize(className, klass.getClassLoader());
                    s_extractorCache.put(klass, extractor);
                } else {
                    // bootstrap classloader
                    extractor = new BcelAttributeExtractor();

                    // extractor = new AsmAttributeExtractor();
                    extractor.initialize(className, ClassLoader.getSystemClassLoader());
                    s_extractorCache.put(klass, extractor);
                }
            } catch (Exception e) {
                throw new WrappedRuntimeException(e);
            }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.annotation.instrumentation.bcel.BcelAttributeExtractor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.