@This Object me, @FieldValue("liveObjectId") Object id, @FieldProxy("liveObjectId") Setter idSetter, @FieldProxy("liveObjectId") Getter idGetter, @FieldValue("liveObjectLiveMap") RMap<?, ?> map, @FieldProxy("liveObjectLiveMap") Setter mapSetter, @FieldProxy("liveObjectLiveMap") Getter mapGetter ) throws Exception { if ("setLiveObjectId".equals(method.getName())) {
@This Object me, @FieldValue("liveObjectId") Object id, @FieldProxy("liveObjectId") Setter idSetter, @FieldProxy("liveObjectId") Getter idGetter, @FieldValue("liveObjectLiveMap") RMap<?, ?> map, @FieldProxy("liveObjectLiveMap") Setter mapSetter, @FieldProxy("liveObjectLiveMap") Getter mapGetter ) throws Exception { if ("setLiveObjectId".equals(method.getName())) {
public void interceptSetter(StepInterceptor interceptor, @FieldProxy( INTERCEPTOR_FIELD_NAME ) StepInterceptorGetterSetter stepInterceptorSetter) { stepInterceptorSetter.setValue(interceptor); } }
@This Object me, @FieldValue("liveObjectId") Object id, @FieldProxy("liveObjectId") Setter idSetter, @FieldProxy("liveObjectId") Getter idGetter, @FieldValue("liveObjectLiveMap") RMap<?, ?> map, @FieldProxy("liveObjectLiveMap") Setter mapSetter, @FieldProxy("liveObjectLiveMap") Getter mapGetter ) throws Exception { if ("setLiveObjectId".equals(method.getName())) {
@RuntimeType @BindingPriority( BindingPriority.DEFAULT * 2 ) public Object interceptDefault( @DefaultCall final Callable<?> zuper, @This final Object receiver, @Origin Method method, @AllArguments final Object[] parameters, @FieldProxy( INTERCEPTOR_FIELD_NAME ) StepInterceptorGetterSetter stepInterceptorGetter ) throws Throwable { StepInterceptor interceptor = (StepInterceptor) stepInterceptorGetter.getValue(); if( interceptor == null ) { return zuper.call(); } Invoker invoker = new Invoker() { @Override public Object proceed() throws Throwable { return zuper.call(); } }; return interceptor.intercept( receiver, method, parameters, invoker ); }
@RuntimeType @BindingPriority( BindingPriority.DEFAULT * 3 ) public Object interceptSuper( @SuperCall final Callable<?> zuper, @This final Object receiver, @Origin Method method, @AllArguments final Object[] parameters, @FieldProxy( INTERCEPTOR_FIELD_NAME ) StepInterceptorGetterSetter stepInterceptorGetter ) throws Throwable { StepInterceptor interceptor = (StepInterceptor) stepInterceptorGetter.getValue(); if( interceptor == null ) { return zuper.call(); } Invoker invoker = new Invoker() { @Override public Object proceed() throws Throwable { return zuper.call(); } }; return interceptor.intercept( receiver, method, parameters, invoker ); }
@RuntimeType public Object intercept( @This final Object receiver, @Origin final Method method, @AllArguments final Object[] parameters, @FieldProxy( INTERCEPTOR_FIELD_NAME ) StepInterceptorGetterSetter stepInterceptorGetter) throws Throwable { // this intercepted method does not have a non-abstract super method StepInterceptor interceptor = (StepInterceptor) stepInterceptorGetter.getValue(); if( interceptor == null ) { return null; } Invoker invoker = new Invoker() { @Override public Object proceed() throws Throwable { return null; } }; return interceptor.intercept( receiver, method, parameters, invoker ); }