Module fun_proxy

The module generates proxy for target function in form of AF tree.

Copyright © 2011 Alexei Krasnopolski

Version: 1.0.1

Introduced in: 2011-06-24

Authors: Alexei Krasnopolski (krasnop@bellsouth.net) [web site: http://crasnopolski.com/].

Description

The module generates proxy for target function in form of AF tree.

Function Index

args_list/2*
args_list/3*
args_to_list/2*
args_to_list/3*
around_params/2*
around_params_rcur/3*
body/6*
body_gen_aft/6*
body_gen_aft_thr/6*
body_gen_bef/6*
body_gen_try/6*
body_proxy_func/6*
body_try/6*
call_advice/2*the function generate part of AF tree corresponded with: advice_module:advice_function(T).
call_after_advice/2*the function generate part of AF tree corresponded with: advice_module:advice_function(T, R).
call_after_thr_advice/2*the function generate part of AF tree corresponded with: advice_module:advice_function(T, {Ex, Rz}) Ex - exception, Rz - error reason.
call_around_advices/4*the function generate part of AF tree corresponded with: R = erlang:apply(around_params(Line, Aspects)) or R = name(P1,P2,..), if Aspects = [] The function arguments are Name - target function name Arity - target function arity Line - current line of source file Aspects - list of around aspects for the target function.
call_generic_advice/3*the function generate part of AF tree corresponded with: advice_module:advice_function(P1,P2,..).
call_target/3*the function generate part of AF tree corresponded with: name(P1,P2,..).
call_target_r/3*the function generate part of AF tree corresponded with: R = name(P1,P2,..).
set_t/4*
target_proxy/6The function generates AF tree that corresponded with source code like this: name(P1,P2,..) -> T = [?MODULE, name_@, [P1,P2,..]], advice1:before1(T), advice2:before2(T), try R = erlang:apply(advice, arround_1, [advice, arround_2, T]), advice1:after_r1(T,R), advice2:after_r2(T,R), R catch Ex:Rz -> advice1:after_e1(T,{Ex,Rz}), advice2:after_e2(T,{Ex,Rz}) after advice1:after_f1(T), advice2:after_f2(T) end .

Function Details

target_proxy/6

target_proxy(Module, Name, Arity, Hidden_name, Line, Aspects) -> term()

throws nothing

The function generates AF tree that corresponded with source code like this: name(P1,P2,..) -> T = [?MODULE, name_@, [P1,P2,..]], advice1:before1(T), advice2:before2(T), try R = erlang:apply(advice, arround_1, [advice, arround_2, T]), advice1:after_r1(T,R), advice2:after_r2(T,R), R catch Ex:Rz -> advice1:after_e1(T,{Ex,Rz}), advice2:after_e2(T,{Ex,Rz}) after advice1:after_f1(T), advice2:after_f2(T) end .

call_target/3 *

call_target(Name, Arity, Line) -> term()

throws nothing

the function generate part of AF tree corresponded with: name(P1,P2,..)

call_target_r/3 *

call_target_r(Name, Arity, Line) -> term()

throws nothing

the function generate part of AF tree corresponded with: R = name(P1,P2,..)

call_generic_advice/3 *

call_generic_advice(Line, Aspect, Param_list) -> term()

throws nothing

the function generate part of AF tree corresponded with: advice_module:advice_function(P1,P2,..)

call_advice/2 *

call_advice(Line, Aspect) -> term()

throws nothing

the function generate part of AF tree corresponded with: advice_module:advice_function(T)

call_after_advice/2 *

call_after_advice(Line, Aspect) -> term()

throws nothing

the function generate part of AF tree corresponded with: advice_module:advice_function(T, R)

call_after_thr_advice/2 *

call_after_thr_advice(Line, Aspect) -> term()

throws nothing

the function generate part of AF tree corresponded with: advice_module:advice_function(T, {Ex, Rz}) Ex - exception, Rz - error reason.

call_around_advices/4 *

call_around_advices(Name, Arity, Line, Aspects) -> term()

throws nothing

the function generate part of AF tree corresponded with: R = erlang:apply(around_params(Line, Aspects)) or R = name(P1,P2,..), if Aspects = [] The function arguments are Name - target function name Arity - target function arity Line - current line of source file Aspects - list of around aspects for the target function

around_params/2 *

around_params(Line, Aspects) -> any()

around_params_rcur/3 *

around_params_rcur(Line, Aspects, Result) -> any()

args_list/2 *

args_list(N, Line) -> any()

args_list/3 *

args_list(N, Line, Result) -> any()

args_to_list/2 *

args_to_list(N, Line) -> any()

args_to_list/3 *

args_to_list(N, Line, Result) -> any()

set_t/4 *

set_t(Module, Name, Arity, Line) -> any()

body/6 *

body(Module, Name, Arity, Hidden_name, Line, Aspects) -> any()

body_proxy_func/6 *

body_proxy_func(Module, Name, Arity, Hidden_name, Line, X6) -> any()

body_try/6 *

body_try(Module, Name, Arity, Hidden_name, Line, X6) -> any()

body_gen_try/6 *

body_gen_try(Module, Name, Arity, Hidden_name, Line, X6) -> any()

body_gen_aft/6 *

body_gen_aft(Module, Name, Arity, Line, Aspects, Result) -> any()

body_gen_aft_thr/6 *

body_gen_aft_thr(Module, Name, Arity, Line, Aspects, Result) -> any()

body_gen_bef/6 *

body_gen_bef(Module, Name, Arity, Line, Aspects, Result) -> any()


Generated by EDoc, Aug 3 2012, 20:09:54.