public static synchronized AttributeExtractor getAttributeExtractor(
final CtClass ctClass, final ClassLoader loader) {
if (ctClass.isPrimitive() || ctClass.isArray() || ctClass.getName().startsWith("java.")) {
return null;
}
JavassistAttributeExtractor extractor;
Integer hash = new Integer((29 * ctClass.hashCode()) + loader.hashCode());
if ((extractor = (JavassistAttributeExtractor)s_extractorCache.get(hash)) == null) {
try {
extractor = new JavassistAttributeExtractor();
extractor.initialize(ctClass);
s_extractorCache.put(hash, extractor);
} catch (Exception e) {
throw new WrappedRuntimeException(e);
}
}