Transfer version 1.1

transfer.com.aop
Class AOPAdvisor

WEB-INF.cftags.component
        extended by transfer.com.aop.AOPAdvisor

public class AOPAdvisor
extends WEB-INF.cftags.component

This does the heavy lifting for getting the advice around the methods


Constructor Summary
init(MethodInjector methodInjector, string definitionPath)
          Constructor
 
Method Summary
 array __findPointCuts(string pointcut)
          builds an array of method point cuts from a string regex
 void __weave(MethodInjector methodInjector, string pointCutName, string advicePath, string aopKey)
          weaves the advice
 void advise(any component, any pointcut, AbstractBaseAdviceBuilder adviceBuilder, [boolean debug='false'])
          wrap some advice around a method
private array findPointCuts(any component, string pointcut)
          builds a array of methods from a poincut regex
private string getDefinitionPath()
private MethodInjector getMethodInjector()
private void setDefinitionPath(string DefinitionPath)
private void setMethodInjector(MethodInjector methodInjector)
private void weaveAdvice(any component, any pointcut, AbstractBaseAdviceBuilder adviceBuilder, [boolean debug='false'])
          weaves the advice into the component's method
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(MethodInjector methodInjector, string definitionPath)
Constructor

Parameters:
methodInjector - The method injector cfc
definitionPath - Path to where the definitions are kept
Method Detail

__findPointCuts

public array __findPointCuts(string pointcut)
builds an array of method point cuts from a string regex

Parameters:
pointcut - a regex for functions to advise

__weave

public void __weave(MethodInjector methodInjector, string pointCutName, string advicePath, string aopKey)
weaves the advice

Parameters:
methodInjector - The method injector
pointCutName - the name of the advice to weave
advicePath - The name the advice file
aopKey - the aop scope key

advise

public void advise(any component, any pointcut, AbstractBaseAdviceBuilder adviceBuilder, [boolean debug='false'])
wrap some advice around a method

Parameters:
component - the component to apply the advice to
pointcut - either a function, or a regex for functions to advise
adviceBuilder - the advice builder
debug - when true, cftrace's the method names that gets adviced

findPointCuts

private array findPointCuts(any component, string pointcut)
builds a array of methods from a poincut regex

Parameters:
component - the component to apply the advice to
pointcut - a regex for functions to advise

getDefinitionPath

private string getDefinitionPath()


getMethodInjector

private MethodInjector getMethodInjector()


setDefinitionPath

private void setDefinitionPath(string DefinitionPath)

Parameters:
DefinitionPath

setMethodInjector

private void setMethodInjector(MethodInjector methodInjector)

Parameters:
methodInjector

weaveAdvice

private void weaveAdvice(any component, any pointcut, AbstractBaseAdviceBuilder adviceBuilder, [boolean debug='false'])
weaves the advice into the component's method

Parameters:
component - the component to apply the advice to
pointcut - the function to write
adviceBuilder - the advice builder
debug - when true, cftrace's the method names that gets adviced

Transfer version 1.1