protected static FastMethod make(final Method method) {
Class<?> klass = method.getDeclaringClass();
String descriptor = Type.getMethodDescriptor(method);
String key = "$FM$" + method.getName() + "$" + Lang.md5(descriptor);
String className = klass.getName() + key;
if (klass.getName().startsWith("java"))
className = FastMethod.class.getPackage().getName() + ".fast." + className;
FastMethod fm = cache.get(className);
if (fm != null)
return fm;
try {
fm = (FastMethod) klass.getClassLoader().loadClass(className).newInstance();
cache.put(className, fm);
return fm;
}
catch (Throwable e) {}
try {
byte[] buf = _make(klass,
method.getModifiers(),
method.getParameterTypes(),
_Method(method),
method.getReturnType(),
className,
descriptor);
Class<?> t = DefaultClassDefiner.defaultOne().define(className,
buf,
klass.getClassLoader());
fm = (FastMethod) t.newInstance();
}
进入到这个方法里了,fm为null了。这个是什么原因呢?