if (!useHook || TypeUtils.isInterface(access)) { throw new IllegalStateException("static hook is invalid for this class"); } if (hook == null) { hook = rec.begin_method(Constants.ACC_STATIC, STATIC_HOOK, null); hook.setStaticHook(true); } return hook;
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); CodeEmitter e = oe.begin_method(Constants.ACC_STATIC, STATIC_HOOK, 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;
    public CodeEmitter getStaticHook() {        if (!useHook || TypeUtils.isInterface(access)) {            throw new IllegalStateException("static hook is invalid for this class");        }        if (hook == null) {             hook = rec.begin_method(Constants.ACC_STATIC, STATIC_HOOK, null);            hook.setStaticHook(true);        }        return hook;    }