if (hook == null) { ClassEmitter oe = new ClassEmitter(outer); oe.declare_field(Constants.PRIVATE_FINAL_STATIC, STATIC_HOOK_FLAG, Type.BOOLEAN_TYPE, null, null); CodeEmitter e = oe.begin_method(Constants.ACC_STATIC, STATIC_HOOK, null, null); Label ok = e.make_label(); e.getstatic(classType, STATIC_HOOK_FLAG, Type.BOOLEAN_TYPE); e.if_jump(e.EQ, ok); e.return_value(); e.mark(ok); e.push(true); e.putstatic(classType, STATIC_HOOK_FLAG, Type.BOOLEAN_TYPE);
if (staticHook == null) { staticHookSig = new Signature("CGLIB$STATICHOOK" + getNextHook(), "()V"); staticHook = begin_method(Constants.ACC_STATIC, staticHookSig, null, null); if (staticInit != null) { staticInit.invoke_static_this(staticHookSig); }
    public CodeEmitter getStaticHook() {         if (TypeUtils.isInterface(access)) {             throw new IllegalStateException("static hook is invalid for this class");         }         if (hook == null) {             ClassEmitter oe = new ClassEmitter(outer);             oe.declare_field(Constants.PRIVATE_FINAL_STATIC, STATIC_HOOK_FLAG, Type.BOOLEAN_TYPE, null, null);             CodeEmitter e = oe.begin_method(Constants.ACC_STATIC, STATIC_HOOK, null, null);             Label ok = e.make_label();             e.getstatic(classType, STATIC_HOOK_FLAG, Type.BOOLEAN_TYPE);             e.if_jump(e.EQ, ok);             e.return_value();             e.mark(ok);             e.push(true);             e.putstatic(classType, STATIC_HOOK_FLAG, Type.BOOLEAN_TYPE);         }         return hook;    }