Spring.Aop Namespace parser for the aop namespace. Using the advisor tag you can configure an and have it applied to all the relevant objects in your application context automatically. The advisor tag supports only referenced s. Rob harrop Adrian Colyer Rod Johnson Mark Pollack (.NET) Register the for the 'config' tag. Utility class for handling registration of auto-proxy creators used internally by the aop namespace tags. Rob Harrop Juergen Hoeller Mark Pollack (.NET) The object name of the internally managed auto-proxy creator. Registers the auto proxy creator if necessary. The parser context. The source element. Registries the or escalate apc as required. The type. The parser context. Forces the auto proxy creator to use decorator proxy. The registry. The for the <aop:config> tag. Mark Pollack (.NET) The 'proxy-target-type' attribute Parse the specified XmlElement and register the resulting ObjectDefinitions with the IObjectDefinitionRegistry embedded in the supplied The element to be parsed. The object encapsulating the current state of the parsing process. Provides access to a IObjectDefinitionRegistry The primary object definition.

This method is never invoked if the parser is namespace aware and was called to process the root node.

Parses the supplied advisor element and registers the resulting The advisor element. The parser context. implementation that registers instances of any non-default instances with the singleton.

The only requirement for it to work is that it needs to be defined in an application context along with any arbitrary "non-native" Spring.NET instances that need to be recognized by Spring.NET's AOP framework.

Dmitriy Kopylenko Aleksandar Seovic (.NET)
Apply this to the given new object instance before any object initialization callbacks.

Does nothing, simply returns the supplied as is.

The new object instance. The name of the object. The object instance to use, either the original or a wrapped one. In case of errors.
Apply this to the given new object instance after any object initialization callbacks.

Registers the supplied with the singleton if it is an instance.

The new object instance. The name of the object. The object instance to use, either the original or a wrapped one. In case of errors.
implementation to enable to be used in the Spring.NET AOP framework. Rod Johnson Aleksandar Seovic (.NET) Permits the handling of new advisors and advice types as extensions to the Spring AOP framework.

Implementors can create AOP Alliance s from custom advice types, enabling these advice types to be used in the Spring.NET AOP framework, which uses interception under the covers.

There is no need for most Spring.NET users to implement this interface; do so only if you need to introduce more or types to Spring.NET.

Rod Johnson Aleksandar Seovic (.NET)
Does this adapter understand the supplied ?

Is it valid to invoke the method with the given advice as an argument?

such as . if this adapter understands the supplied .
Return an AOP Alliance exposing the behaviour of the given advice to an interception-based AOP framework.

Don't worry about any contained in the supplied ; the AOP framework will take care of checking the pointcut.

The advice. The method must have previously returned on the supplied . An AOP Alliance exposing the behaviour of the given advice to an interception-based AOP framework.
Returns if the supplied is an instance of the interface. The advice to check. if the supplied is an instance of the interface; if not or if the supplied is . Wraps the supplied 's within a instance. The advisor exposing the that is to be wrapped. The supplied 's wrapped within a instance. Interceptor to wrap an instance.

A more efficient alternative solution in cases where there is no interception advice and therefore no need to create an object may be offered in future.

Used internally by the AOP framework: application developers should not need to use this class directly.

Rod Johnson Aleksandar Seovic (.NET)
Intercepts calls on an interface on its way to the target.

Such interceptions are nested "on top" of the target.

Represents a generic interceptor.

A generic interceptor can intercept runtime events that occur within a base program. Those events are materialized by (reified in) joinpoints. Runtime joinpoints can be invocations, field access, exceptions, etc.

This interface is not used directly. Use the various derived interfaces to intercept specific events.

Tag interface for advice.

Implementations can be any type of advice, such as interceptors.

Implement this method to perform extra treatments before and after the call to the supplied .

Polite implementations would certainly like to invoke .

The method invocation that is being intercepted. The result of the call to the method of the supplied ; this return value may well have been intercepted by the interceptor. If any of the interceptors in the chain or the target object itself throws an exception.
Creates a new instance of the class. The advice to be applied after a target method successfully returns. If the supplied is . Executes interceptor after the target method successfully returns. The method invocation that is being intercepted. The result of the call to the method of the supplied ; this return value may well have been intercepted by the interceptor. If any of the interceptors in the chain or the target object itself throws an exception. implementation to enable to be used in the Spring.NET AOP framework. Rod Johnson Aleksandar Seovic (.NET) Returns if the supplied is an instance of the interface. The advice to check. if the supplied is an instance of the interface; if not or if the supplied is . Wraps the supplied 's within a instance. The advisor exposing the that is to be wrapped. The supplied 's wrapped within a instance. Default implementation of the interface. Rod Johnson Aleksandar Seovic (.NET) A registry of instances.

Implementations must also automatically register adapters for types.

This is an SPI interface, that should not need to be implemented by any Spring.NET user.
Rod Johnson Aleksandar Seovic (.NET)
Returns an wrapping the supplied . The object that should be an advice, such as or . An wrapping the supplied . Never returns . If the parameter is an , it will simply be returned. If no registered can wrap the supplied . Returns an to allow the use of the supplied in an interception-based framework.

Don't worry about the pointcut associated with the ; if it's an , just return an interceptor.

The advisor to find an interceptor for. An interceptor to expose this advisor's behaviour. If the advisor type is not understood by any registered .
Register the given .

Note that it is not necessary to register adapters for instances: these must be automatically recognized by an implementation.

An that understands the particular advisor and advice types.
Creates a new instance of the class.

This constructor will also register the well-known types.

Returns an wrapping the supplied . The object that should be an advice, such as or . An wrapping the supplied . Never returns . If the parameter is an , it will simply be returned. If no registered can wrap the supplied . Returns an to allow the use of the supplied in an interception-based framework. The advisor to find an interceptor for. An interceptor to expose this advisor's behaviour. If the advisor type is not understood by any registered . Register the given . An that understands the particular advisor and advice types. Provides Singleton-style access to the default instance. Rod Johnson Aleksandar Seovic (.NET) Creates a new instance of the class.

This contructor is marked as to enforce the Singleton pattern

The default instance. implementation that wraps instances.

In the future Spring.NET may also offer a more efficient alternative solution in cases where there is no interception advice and therefore no need to create an object.

Used internally by the Spring.NET AOP framework: application developers should not need to use this class directly.

Rod Johnson Aleksandar Seovic (.NET)
Creates a new instance of the class. The that is to be wrapped. If the supplied is . Executes interceptor before the target method successfully returns. The method invocation that is being intercepted. The result of the call to the method of the supplied . If any of the interceptors in the chain or the target object itself throws an exception. implementation to enable to be used in the Spring.NET AOP framework. Rod Johnson Aleksandar Seovic (.NET) Returns if the supplied is an instance of the interface. The advice to check. if the supplied is an instance of the interface; if not or if the supplied is . Wraps the supplied 's within a instance. The advisor exposing the that is to be wrapped. The supplied 's wrapped within a instance. Interceptor to wrap an after throwing advice.

Implementations of the interface must define methods of the form... AfterThrowing([MethodInfo method, Object[] args, Object target], Exception subclass); The method name is fixed (i.e. your methods must be named AfterThrowing. The first three arguments (as a whole) are optional, and only useful if futher information about the joinpoint is required. The return type can be anything, but is almost always by convention.

Please note that the object encapsulating the throws advice does not need to implement the interface. Throws advice methods are discovered via reflection... the interface serves merely to discover objects that are to be considered as throws advice. Other mechanisms for discovering throws advice such as attributes are also equally valid... all that this class cares about is that a throws advice object implement one or more methods with a valid throws advice signature (see above, and the examples below).

This is a framework class that should not normally need to be used directly by Spring.NET users.

Find below some examples of valid method signatures...

public class GlobalExceptionHandlingAdvice : IThrowsAdvice { public void AfterThrowing(Exception ex) { // handles absolutely any and every Exception... } } public class RemotingExceptionHandlingAdvice : IThrowsAdvice { public void AfterThrowing(RemotingException ex) { // handles any and every RemotingException (and subclasses of RemotingException)... } } using System.Data; public class DataExceptionHandlingAdvice { public void AfterThrowing(ConstraintException ex) { // specialised handling of ConstraintExceptions } public void AfterThrowing(NoNullAllowedException ex) { // specialised handling of NoNullAllowedExceptions } public void AfterThrowing(DataException ex) { // handles all other DataExceptions... } }
Rod Johnson Aleksandar Seovic (.NET)
The mapping of exception Types to MethodInfo handlers. Creates a new instance of the class. The throws advice to check for exception handler methods. If the supplied is . If no (0) handler methods were discovered on the supplied ; or if more than one handler method suitable for a particular type was discovered on the supplied . Executes interceptor if (and only if) the supplied throws an exception that is mapped to an appropriate exception handler. The method invocation that is being intercepted. The result of the call to the method of the supplied (this assumes no exception was thrown by the call to the supplied . If any of the interceptors in the chain or the target object itself throws an exception. Gets the exception handler (if any) that has been mapped to the supplied .

Will return if not found.

The exception handler for the of the supplied given exception. exception that was thrown
Invokes handler method with appropriate number of parameters The original method invocation that was intercepted. The exception that triggered this interceptor. The exception handler method to invoke. Convenience property that returns the number of exception handler methods managed by this interceptor. The number of exception handler methods managed by this interceptor. Exception thrown when an attempt is made to use an unsupported or type. Rod Johnson Aleksandar Seovic (.NET) Creates a new instance of the class. The advice that caused the exception. Creates a new instance of the class. Creates a new instance of the class with the specified message. A message about the exception. Creates a new instance of the class with the specified message and root cause. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Summary description for AbstractPrototypeBasedTargetSourceCreator. Implementations can create special target sources, such as pooling target sources, for particular objects. For example, they may base their choice on attributes, such as a pooling attribute, on the target type.

AbstractAutoProxyCreator can support a number of TargetSourceCreators, which will be applied in order.

Rod Johnson Adhari C Mahendra (.NET)
Create a special TargetSource for the given object, if any. The type of the object to create a TargetSource for the name of the object the containing factory a special TargetSource or null if this TargetSourceCreator isn't interested in the particular object The logger Create a special TargetSource for the given object, if any. the type of the object to create a TargetSource for the name of the object the containing factory a special TargetSource or null if this TargetSourceCreator isn't interested in the particular object Creates the prototype target source. The type of the object to create a target source for. The name. The factory. Abstract IOBjectPostProcessor implementation that creates AOP proxies. This class is completely generic; it contains no special code to handle any particular aspects, such as pooling aspects.

Subclasses must implement the abstract findCandidateAdvisors() method to return a list of Advisors applying to any object. Subclasses can also override the inherited shouldSkip() method to exclude certain objects from autoproxying, but they must be careful to invoke the shouldSkip() method of this class, which tries to avoid circular reference problems and infinite loops.

Advisors or advices requiring ordering should implement the Ordered interface. This class sorts advisors by Ordered order value. Advisors that don't implement the Ordered interface will be considered to be unordered, and will appear at the end of the advisor chain in undefined order.

Rod Johnson Adhari C Mahendra (.NET)
ObjectPostProcessor implementation that wraps a group of objects with AOP proxies that delegate to the given interceptors before invoking the object itself.

This class distinguishes between "common" interceptors: shared for all proxies it creates, and "specific" interceptors: unique per object instance. There need not be any common interceptors. If there are, they are set using the interceptorNames property. As with ProxyFactoryObject, interceptors names in the current factory are used rather than object references to allow correct handling of prototype advisors and interceptors: for example, to support stateful mixins. Any advice type is supported for "interceptorNames" entries.

Such autoproxying is particularly useful if there's a large number of objects that need to be wrapped with similar proxies, i.e. delegating to the same interceptors. Instead of x repetitive proxy definitions for x target objects, you can register one single such post processor with the object factory to achieve the same effect.

Subclasses can apply any strategy to decide if a object is to be proxied, e.g. by type, by name, by definition details, etc. They can also return additional interceptors that should just be applied to the specific object instance. The default concrete implementation is ObjectNameAutoProxyCreator, identifying the objects to be proxied via a list of object names.

Any number of TargetSourceCreator implementations can be used with any subclass, to create a custom target source - for example, to pool prototype objects. Autoproxying will occur even if there is no advice if a TargetSourceCreator specifies a custom TargetSource. If there are no TargetSourceCreators set, or if none matches, a SingletonTargetSource will be used by default to wrap the object to be autoproxied.

Juergen Hoeller Rod Johnson Adhari C Mahendra (.NET)
Convenience superclass for configuration used in creating proxies, to ensure that all proxy creators have consistent properties.

Note that it is no longer possible to configure subclasses to expose the . Interceptors should normally manage their own thread locals if they need to make resources available to advised objects. If it is absolutely necessary to expose the , use an interceptor to do so.

Rod Johnson Aleksandar Seovic (.NET)
Copies the configuration from the supplied into this instance. The configuration to be copied. If the supplied is . A that represents the current configuration. A that represents the current configuration. Use to synchronize access to this ProxyConfig instance Is the target to be proxied in addition to any interfaces declared on the proxied ? Is target type attributes, method attributes, method's return type attributes and method's parameter attributes to be proxied in addition to any interfaces declared on the proxied ? Are any agressive optimizations to be performed?

The exact meaning of agressive optimizations will differ between proxies, but there is usually some tradeoff.

For example, optimization will usually mean that advice changes won't take effect after a proxy has been created. For this reason, optimization is disabled by default. An optimize value of may be ignored if other settings preclude optimization: for example, if the property is set to and such a value is not compatible with the optimization.

The default is .

Should proxies obtained from this configuration expose the AOP proxy to the class?

The default is , as enabling this property may impair performance.

Gets and set the factory to be used to create AOP proxies.

This obviously allows one to customise the implementation, allowing different strategies to be dropped in without changing the core framework. For example, an implementation could return an using remoting proxies, Reflection.Emit or a code generation strategy.

Is this configuration frozen?

The default is not frozen.

The logger for this class hierarchy. Convenience constant for subclasses: Return value for "do not proxy". Convenience constant for subclasses: Return value for "proxy without additional interceptors, just the common ones". Default value is same as non-ordered Default is global AdvisorAdapterRegistry Names of common interceptors. We must use object name rather than object references to handle prototype advisors/interceptors. Default is the empty array: no common interceptors. Set of object type + name strings, referring to all objects that this auto-proxy creator created a custom TargetSource for. Used to detect own pre-built proxies (from "PostProcessBeforeInstantiation") in the "PostProcessAfterInitialization" method. Create a proxy with the configured interceptors if the object is identified as one to proxy by the subclass. No-op for before initialization. The obj. The name. Subclasses should override this method to return true if this object should not be considered for autoproxying by this post processor. Sometimes we need to be able to avoid this happening if it will lead to a circular reference. This implementation returns false. the type of the object the name of the object if remarkable to skip Subclasses may choose to implement this: for example, to change the interfaces exposed ProxyFactory that will be used to create the proxy immediably after this method returns. Determines whether the object is an infrastructure type, IAdvisor, IAdvice, IAdvisors or AbstractAutoProxyCreator The object type to compare The name of the object true if [is infrastructure type] [the specified obj]; otherwise, false. Create a target source for object instances. Uses any TargetSourceCreators if set. Returns null if no Custom TargetSource should be used. This implementation uses the customTargetSourceCreators property. Subclasses can override this method to use a different mechanism. the type of the object to create a TargetSource for the name of the object a TargetSource for this object Return whether the given object is to be proxied, what additional advices (e.g. AOP Alliance interceptors) and advisors to apply.

The previous name of this method was "GetInterceptorAndAdvisorForObject". It has been renamed in the course of general terminology clarification in Spring 1.1. An AOP Alliance Interceptor is just a special form of Advice, so the generic Advice term is preferred now.

The third parameter, customTargetSource, is new in Spring 1.1; add it to existing implementations of this method.

the new object instance the name of the object targetSource returned by TargetSource property: may be ignored. Will be null unless a custom target source is in use. an array of additional interceptors for the particular object; or an empty array if no additional interceptors but just the common ones; or null if no proxy at all, not even with the common interceptors.
Create an AOP proxy for the given object. Type of the object. The name of the object. The set of interceptors that is specific to this object (may be empty but not null) The target source for the proxy, already pre-configured to access the object. The AOP Proxy for the object. Obtain a new proxy factory instance to be used for proxying a particular object A proxy factory instance for proxying a particular object Determines the advisors for the given object, including the specific interceptors as well as the common interceptor, all adapted to the Advisor interface. The name of the object. The set of interceptors that is specific to this object (may be empty, but not null) The list of Advisors for the given object Build a cache key for the given object type and object name The object type. The object name. The cache key for the given type and name Create the proxy if have a custom TargetSource The object type The object name null if not creating a proxy, otherwise return the proxy. Default behavior, return true and continue processing. The object instance The object name. true Default behavior, return passed in PropertyValues The property values that the factory is about to apply (never null). he relevant property infos for the target object (with ignored dependency types - which the factory handles specifically - already filtered out) The object instance created, but whose properties have not yet been set. Name of the object. The passed in PropertyValues Sets the AdvisorAdapterRegistry to use. Default is the global AdvisorAdapterRegistry. Sets custom TargetSourceCreators to be applied in this order. If the list is empty, or they all return null, a SingletonTargetSource will be created. TargetSourceCreators can only be invoked if this post processor is used in a IObjectFactory, and its ObjectFactoryAware callback is used. Sets the common interceptors, a list of , and introduction object names. If this property isn't set, there will be zero common interceptors. This is perfectly valid, if "specific" interceptors such as matching Advisors are all we want. The list of , and introduction object names. Sets whether the common interceptors should be applied before object-specific ones. Default is true; else, object-specific interceptors will get applied first. Set whether or not the proxy should be frozen, preventing advice from being added to it once it is created.

Overridden from the super class to prevent the proxy configuration from being frozen before the proxy is created. The default is not frozen.

Callback that supplies the owning factory to an object instance. Owning (may not be ). The object can immediately call methods on the factory.

Invoked after population of normal object properties but before an init callback like 's method or a custom init-method.

In case of initialization errors.
Propery Order Ordering which will apply to this class's implementation of Ordered, used when applying multiple ObjectPostProcessors. Default value is int.MaxValue, meaning that it's non-ordered. Return whether the given object is to be proxied, what additional advices (e.g. AOP Alliance interceptors) and advisors to apply. the new object instance the name of the object targetSource returned by TargetSource property: may be ignored. Will be null unless a custom target source is in use. an array of additional interceptors for the particular object; or an empty array if no additional interceptors but just the common ones; or null if no proxy at all, not even with the common interceptors.

The previous name of this method was "GetInterceptorAndAdvisorForObject". It has been renamed in the course of general terminology clarification in Spring 1.1. An AOP Alliance Interceptor is just a special form of Advice, so the generic Advice term is preferred now.

The third parameter, customTargetSource, is new in Spring 1.1; add it to existing implementations of this method.

Find all eligible advices and for autoproxying this class. the empty list, not null, if there are no pointcuts or interceptors Sorts the advisors. The advisors. Find all candidate advisors to use in auto-proxying. list of Advisors We override this method to ensure that all candidate advisors are materialized under a stack trace including this object. Otherwise, the dependencies won't be apparent to the circular-reference prevention strategy in AbstractObjectFactory. The base class for AutoProxyCreator implementations that mark objects eligible for proxying based on arbitrary criteria. Erich Eichinger Overridden to call . the type of the object the name of the object if remarkable to skip Override to always return . Whether an object shall be proxied or not is determined by the result of . ingored ignored ignored Always to indicate, that the object shall be proxied. Decide, whether the given object is eligible for proxying. Override this method to allow or reject proxying for the given object. the object's type the name of the object whether the given object shall be proxied. An AutoProxyCreator, that identifies objects to be proxied by checking s defined on their type. Erich Eichinger Determines, whether the given object shall be proxied by matching against . the object's type the name of the object Checks if is annotated with any of the attributes within the given list of . the object's type the list of types to match agains. whether to check base classes and intefaces for any of the given attributes. if any of the attributes is found Checks if is annotated with the specified . the object's type the type to match agains. whether to check base classes and intefaces for the specified attribute. if the attributes is found Indicates, whether to consider base types for filtering when checking declared attributes. Defaults to false. The list of attribute types marking object types as eligible for auto-proxying by this AutoProxyCreator. Must not be null. ObjectPostProcessor implementation that creates AOP proxies based on all candidate Advisors in the current IObjectFactory. This class is completely generic; it contains no special code to handle any particular aspects, such as pooling aspects. Rod Johnson Adhari C Mahendra (.NET) Separator between prefix and remainder of object name Find all candidate advices to use in auto proxying. list of Advice Invoked by an after it has injected all of an object's dependencies. Gets or sets a value indicating whether to exclude advisors with a certain prefix. true if [use prefix]; otherwise, false. Set the prefix for object names that will cause them to be included for auto-proxying by this object. This prefix should be set to avoid circular references. Default value is the object name of this object + a dot. The advisor object name prefix. Set the name of the object in the object factory that created this object. The name of the object in the factory.

Invoked after population of normal object properties but before an init callback like 's method or a custom init-method.

implementation that replaces a group of objects with a 'true' inheritance based AOP mechanism that delegates to the given interceptors before invoking the object itself. Bruno Baia Allows for custom modification of an application context's object definitions.

If the object name matches, replaces the type by a AOP proxied type based on inheritance.

Determines whether the object is an infrastructure type, IAdvisor, IAdvice, IAdvisors, AbstractAutoProxyCreator or InheritanceBasedAopConfigurer. The object type to compare The name of the object true if [is infrastructure type] [the specified obj]; otherwise, false. Create an AOP proxy for the given object. Type of the object. The name of the object. The AOP Proxy for the object. Return if the given object name matches one of the object names specified.

The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. Can be overridden in subclasses.

the object name to check if the names match
Set the names of the objects in IList fashioned way that should automatically get intercepted. A name can specify a prefix to match by ending with "*", e.g. "myObject,tx*" will match the object named "myObject" and all objects whose name start with "tx". Sets the common interceptors, a list of , and introduction object names. If this property isn't set, there will be zero common interceptors. This is perfectly valid, if "specific" interceptors such as matching Advisors are all we want. The list of , and introduction object names. Is target type attributes, method attributes, method's return type attributes and method's parameter attributes to be proxied in addition to any interfaces declared on the proxied ? Gets or sets a value indicating whether inherited members should be proxied. if inherited members should be proxied; otherwise, . Gets or sets a value indicating whether interfaces members should be proxied. if interfaces members should be proxied; otherwise, . Callback that supplies the owning factory to an object instance. Owning (may not be ). The object can immediately call methods on the factory.

Invoked after population of normal object properties but before an init callback like 's method or a custom init-method.

In case of initialization errors.
Return the order value of this object, where a higher value means greater in terms of sorting. Ordering which will apply to this class's implementation of Ordered, used when applying multiple ObjectPostProcessors. Default value is int.MaxValue, meaning that it's non-ordered. The order value. Used to obtain the current "target" of an AOP invocation

This target will be invoked via reflection if no around advice chooses to end the interceptor chain itself.

If an is "static", it will always return the same target, allowing optimizations in the AOP framework. Dynamic target sources can support pooling, hot swapping etc.

Application developers don't usually need to work with target sources directly: this is an AOP framework interface.

Rod Johnson Aleksandar Seovic (.NET)
Returns the target object. The target object. If unable to obtain the target object. Releases the target object. The target object to release. The of the target object. Is the target source static? if the target source is static. AutoProxyCreator that identifies objects to proxy via a list of names. Auto proxy creator that identifies objects to proxy via a list of names. Checks for direct, "xxx*", "*xxx" and "*xxx*" matches. In case of a IFactoryObject, only the objects created by the FactoryBean will get proxied. If you intend to proxy a IFactoryObject instance itself specify the object name of the IFactoryObject including the factory-object prefix "&" e.g. "&MyFactoryObject". Juergen Hoeller Adhari C Mahendra (.NET) Initializes a new instance of . Identify as object to proxy if the object name is in the configured list of names. Return if the given object name matches the mapped name.

The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. Can be overridden in subclasses.

the object name to check the name in the configured list of names if the names match
Set the names of the objects in IList fashioned way that should automatically get wrapped with proxies. A name can specify a prefix to match by ending with "*", e.g. "myObject,tx*" will match the object named "myObject" and all objects whose name start with "tx". This AutoProxyCreator only proxies objects matching the specified . Erich Eichinger Determines, whether the given object shall be proxied. Set the pointcut used to filter objects that should automatically get wrapped with proxies. AutoProxyCreator, that identifies objects to proxy by matching their against a list of patterns. Erich Eichinger Decide, whether the given object is eligible for proxying. Override this method to allow or reject proxying for the given object. the object's type the name of the object whether the given object shall be proxied. The list of patterns to match against. For pattern syntax, see Base class for AOP method builders that contains common functionalities. Aleksandar Seovic Bruno Baia The implementation to use. The dictionary to cache the list of target s. The dictionary to cache the list of target s defined on the proxy. The local variable to store the list of method interceptors. The local variable to store the target type being proxied. The local variable to store method arguments. The local variable to store the return value. The local variable to store the closed generic method when the target method is generic. The local variable to store the closed generic method when the target method defined on the proxy is generic. The field to cache the target . The field to cache the target defined on the proxy. Indicates if the method returns a value. Creates a new instance of the method builder. The type builder to use. The implementation to use. if the interface is to be implemented explicitly; otherwise . The dictionary to cache the list of target s. Creates a new instance of the method builder. The type builder to use. The implementation to use. if the interface is to be implemented explicitly; otherwise . The dictionary to cache the list of target s. The dictionary to cache the list of target s defined on the proxy. Generates the proxy method. The IL generator to use. The method to proxy. The interface definition of the method, if applicable. Generates unique method id for the cache field. The target method. An unique method name. Create static field that will cache target method. The IL generator to use. The target method. Create static field that will cache target method when defined on the proxy. The IL generator to use. The target method. Create a closed generic method for the current call if target method is a generic definition. The IL generator to use. The target method. The field that contains the method generic definition The local variable to store the closed generic method. Generates the IL instructions that pushes the target type on stack. The IL generator to use. Generates the IL instructions that pushes the current instance on stack. The IL generator to use. Pushes the target to stack. The IL generator to use. The method to proxy. Pushes the target defined on the proxy to stack. The IL generator to use. The method to proxy. Creates local variable declarations. The IL generator to use. The method to proxy. Initializes local variables The IL generator to use. The method to proxy. Generates method logic. The IL generator to use. The method to proxy. The interface definition of the method, if applicable. Calls method using Invoke The IL generator to use. The method to proxy. Setup proxied method arguments. The IL generator to use. The method to proxy. The method's parameters. Calls proxied method directly. The IL generator to use. The method to proxy. The interface definition of the method, if applicable. Ends method by returning return value if appropriate. The IL generator to use. The method to proxy. Emits MSIL instructions to load a value of the specified onto the evaluation stack indirectly. The IL generator to use. The type of the value. Emit MSIL instructions to store a value of the specified at a supplied address. The IL generator to use. The type of the value. Emits MSIL instructions to convert the boxed representation of the supplied to its unboxed form. The IL generator to use. The type specified in the instruction. Base class for proxy builders that can be used to create an AOP proxy for any object. Bruno Baia Describes the operations that generates IL instructions used to build the Aop proxy type. Bruno Baia Generates the IL instructions that pushes the current instance on stack. The IL generator to use. Generates the IL instructions that pushes the target instance on which calls should be delegated to. The IL generator to use. Generates the IL instructions that pushes the current instance on stack. The IL generator to use. Calculates and returns the list of attributes that apply to the specified type. Removes from the list. The type to find attributes for. A list of custom attributes that should be applied to type. Represents the AOP configuration data built-in with the proxy. Bruno Baia Configuration data for an AOP proxy factory.

This configuration includes the s, s, and (any) proxied interfaces.

Any AOP proxy obtained from Spring.NET can be cast to this interface to allow the manipulation of said proxy's AOP advice.

Rod Johnson Aleksandar Seovic (.NET)
Adds the supplied to the end (or tail) of the advice (interceptor) chain.

Please be aware that Spring.NET's AOP implementation only supports method advice (as encapsulated by the interface).

The to be added.
Adds the supplied to the supplied in the advice (interceptor) chain.

Please be aware that Spring.NET's AOP implementation only supports method advice (as encapsulated by the interface).

The zero (0) indexed position (from the head) at which the supplied is to be inserted into the advice (interceptor) chain. The to be added.
Is the supplied (interface) proxied? The interface to test. if the supplied (interface) is proxied; if not or the supplied is . Adds the advisors from the supplied to the list of . The to add advisors from. If this proxy configuration is frozen and the cannot be added. Adds the supplied to the list of . The to add. If this proxy configuration is frozen and the cannot be added. Adds the supplied to the list of . The index in the list at which the supplied is to be inserted. The to add. If this proxy configuration is frozen and the cannot be added. Adds the supplied to the list of . The to add. If this proxy configuration is frozen and the cannot be added. Adds the supplied to the list of . The index in the list at which the supplied is to be inserted. The to add. If this proxy configuration is frozen and the cannot be added. Return the index (0 based) of the supplied in the interceptor (advice) chain for this proxy.

The return value of this method can be used to index into the list.

The to search for. The zero (0) based index of this advisor, or -1 if the supplied is not an advisor for this proxy.
Return the index (0 based) of the supplied in the introductions for this proxy.

The return value of this method can be used to index into the list.

The to search for. The zero (0) based index of this advisor, or -1 if the supplied is not an introduction advisor for this proxy.
Removes the supplied the list of advisors for this proxy. The advisor to remove. if advisor was found in the list of for this proxy and was successfully removed; if not or if the supplied is . If this proxy configuration is frozen and the cannot be removed. Removes the at the supplied in the list from the list of for this proxy. The index of the to remove. If this proxy configuration is frozen and the at the supplied cannot be removed; or if the supplied is out of range. Removes the supplied from the list of . The to remove. if the supplied was found in the list of and successfully removed. If this proxy configuration is frozen and the cannot be removed. Removes the supplied from the list of . The to remove. if the supplied was found in the list of and successfully removed. If this proxy configuration is frozen and the cannot be removed. Removes the at the supplied in the list of for this proxy. The index of the advisor to remove. If this proxy configuration is frozen and the at the supplied cannot be removed; or if the supplied is out of range. Replaces the that exists at the supplied in the list of with the supplied . The index of the in the list of that is to be replaced. The new (replacement) . If the supplied is out of range. Replaces the with the . The original (old) advisor to be replaced. The new advisor to replace the with. if the was replaced; if the was not found in the advisors collection, this method returns and (effectively) does nothing. If this proxy configuration is frozen and the cannot be replaced. As will normally be passed straight through to the advised target, this method returns the equivalent for the AOP proxy itself. A description of the proxy configuration. Should proxies obtained from this configuration expose the AOP proxy to the class?

This is useful if an advised object needs to call another advised method on itself. (If it uses the this reference (Me in Visual Basic.NET), the invocation will not be advised).

Gets the implementation that will be used to get the interceptor chains for the advised . The implementation that will be used to get the interceptor chains for the advised . Is the target to be proxied in addition to any interfaces declared on the proxied ? Is target type attributes, method attributes, method's return type attributes and method's parameter attributes to be proxied in addition to any interfaces declared on the proxied ? Returns the collection of instances that have been applied to this proxy.

Will never return , but may return an empty array (in the case where no instances have been applied to this proxy).

The collection of instances that have been applied to this proxy.
Returns the collection of instances that have been applied to this proxy.

Will never return , but may return an empty array (in the case where no instances have been applied to this proxy).

The collection of instances that have been applied to this proxy.
Returns the collection of interface s to be (or that are being) proxied by this proxy. The collection of interface s to be (or that are being) proxied by this proxy. Returns the mapping of the proxied interface s to their delegates. The mapping of the proxied interface s to their delegates. Is this configuration frozen?

When a config is frozen, no advice changes can be made. This is useful for optimization, and useful when we don't want callers to be able to manipulate configuration after casting to .

Returns the used by this object. The used by this object. Returns a boolean specifying if this instance can be serialized. true if this instance can be serialized, false otherwise. Should we use dynamic reflection for method invocation ? Optimization fields IAdvised delegate Array of introduction delegates Target source wrapper Type of target object. Creates a new instance of the class. Creates a new instance of the class. Creates a new instance of the class. The proxy configuration. Creates a new instance of the class. The proxy configuration. The proxy. Deserialization constructor. Serialization data. Serialization context. Serializes this instance. Serialization data. Serialization context. Initialization method. The proxy configuration. The current implementation. Invokes intercepted methods using reflection proxy object target object to invoke method on target type taget method to invoke The method to invoke on proxy. method arguments interceptor chain value returned by invocation chain Returns a list of method interceptors target type target method list of inteceptors for the specified method Adds the supplied to the end (or tail) of the advice (interceptor) chain. The to be added. Adds the supplied to the supplied in the advice (interceptor) chain. The zero (0) indexed position (from the head) at which the supplied is to be inserted into the advice (interceptor) chain. The to be added. Gets the target type behind the implementing object. Ttypically a proxy configuration or an actual proxy. The type of the target or null if not known. implementation that delegates method calls to the base method. Bruno Baia Creates a new instance of the method builder. The type builder to use. The implementation to use. The dictionary to cache the list of target s. The dictionary to cache the list of target s defined on the proxy. Create static field that will cache target method when defined on the proxy. The IL generator to use. The target method. Calls target method directly. The IL generator to use. The method to proxy. The interface definition of the method, if applicable. Base class that each dynamic composition proxy has to extend. Aleksandar Seovic Bruno Baia The central interface for Spring.NET based AOP proxies. Rod Johnson Aleksandar Seovic (.NET) Creates a new proxy object. Default constructor. Creates a new instance of the class. The proxy configuration. Deserialization constructor. Serialization data. Serialization context. Populates a with the data needed to serialize the target object. Returns this proxy instance Delegate to target object handling of equals method. The object to compare with the current target object true if the specified Object is equal to the current target object; otherwise, false Delgate to the target object generation of the hash code. A hash code for the target object. Returns a String the represents the target object. A String that represents the target object Implementation of the interface that caches the AOP proxy instance.

Caches against a key based on : - the base type - the target type - the interfaces to proxy

Bruno Baia Erich Eichinger
Default implementation of the interface, either creating a decorator-based dynamic proxy or a composition-based dynamic proxy.

Creates a decorator-base proxy if one the following is true : - the "ProxyTargetType" property is set - no interfaces have been specified

In general, specify "ProxyTargetType" to enforce a decorator-based proxy, or specify one or more interfaces to use a composition-based proxy.

Rod Johnson Aleksandar Seovic (.NET) Bruno Baia (.NET)
Factory interface for the creation of AOP proxies based on configuration objects. Rod Johnson Aleksandar Seovic (.NET) Creates an for the supplied configuration. The AOP configuration. An . If the supplied configuration is invalid. Force transient assemblies to be resolvable by . Creates an for the supplied configuration. The AOP configuration. An . If the supplied configuration is invalid. Generates the proxy type. The to use The generated proxy class. The shared instance for this class. Generates the proxy type and caches the instance against the base type and the interfaces to proxy. The to use The generated or cached proxy class. Uniquely identifies a proxytype in the cache Builds an AOP proxy type using composition. Aleksandar Seovic Bruno Baia Creates a new instance of the class. The proxy configuration. Creates the proxy type. The generated proxy type. Generates the IL instructions that pushes the current instance on stack. The IL generator to use. Implements serialization constructor. Type builder to use. Implements constructors for the proxy class.

This implementation calls the base constructor.

The builder to use.
Determines if the specified is one of those generated by this builder. The type to check. if the type is a composition-based proxy; otherwise . Builds an AOP proxy type using the decorator pattern. Bruno Baia AdvisedProxy instance calls should be delegated to. Creates a new instance of the class. The proxy configuration. Creates the proxy type. The generated proxy class. Generates the IL instructions that pushes the current instance on stack. The IL generator to use. Declares field that holds the instance used by the proxy. The builder to use for code generation. Implements serialization method. Implements serialization constructor. Type builder to use. Implements constructors for the proxy class.

This implementation creates a new instance of the class.

The builder to use.
Implements interface. The type builder to use. Determines if the specified is one of those generated by this builder. The type to check. if the type is a decorator-based proxy; otherwise . implementation that delegates method calls to an instance. Bruno Baia The implementation to use. Creates a new instance of the method builder. The type builder to use. The implementation to use. Generates the IL instructions that pushes the target instance on which calls should be delegated to. The IL generator to use. Builds an AOP proxy type using inheritance. Bruno Baia AdvisedProxy instance calls should be delegated to. Creates a new instance of the class. The proxy configuration. Creates the proxy type. The generated proxy class. Generates the IL instructions that pushes the target instance on which calls should be delegated to. The IL generator to use. Generates the IL instructions that pushes the current instance on stack. The IL generator to use. Declares field that holds the instance used by the proxy. The builder to use for code generation. Implements serialization method. Implements serialization constructor. Type builder to use. Defines the types of the parameters for the specified constructor. The constructor to use. The types for constructor's parameters. Generates the proxy constructor.

This implementation creates instance of the AdvisedProxy object.

The constructor builder to use. The IL generator to use. The constructor to delegate the creation to.
Implements interface. The type builder to use. Determines if the specified is one of those generated by this builder. The type to check. if the type is a inheritance-based proxy; otherwise . Gets or sets a value indicating whether inherited members should be proxied. if inherited members should be proxied; otherwise, . implementation that delegates method calls to introduction object. Aleksandar Seovic Bruno Baia The index of the introduction to delegate call to. Creates a new instance of the method builder. The type builder to use. The implementation to use. index of the introduction to delegate call to Generates the IL instructions that pushes the introduction type on stack. The IL generator to use. Generates the IL instructions that pushes the introduction instance on stack. The IL generator to use. Calls proxied method directly. The IL generator to use. The method to proxy. The interface definition of the method, if applicable. implementation that delegates method calls to target object. Aleksandar Seovic Bruno Baia The local variable to store the instance. Creates a new instance of the method builder. The type builder to use. The implementation to use. if the interface is to be implemented explicitly; otherwise . The dictionary to cache the list of target s. Creates local variable declarations. The IL generator to use. The method to proxy. Generates method logic. The IL generator to use. The method to proxy. The interface definition of the method, if applicable. Calls proxied method directly. The IL generator to use. The method to proxy. The interface definition of the method, if applicable. Convenience base class for implementations.

Subclasses can override the method to change this behavior, so this is a useful/ base class for implementations.

Rod Johnson Aleksandar Seovic (.NET) Rick Evans (.NET) Bruno Baia (.NET)
Description of an invocation to a method, given to an interceptor upon method-call.

A method invocation is a joinpoint and can be intercepted by a method interceptor.

Represents an invocation in the program.

An invocation is a joinpoint and can be intercepted by an interceptor. Typical examples would be a constructor invocation and a method call.

Represents a generic runtime joinpoint (in the AOP terminology).

A runtime joinpoint is an event that occurs on a static joinpoint (i.e. a location in a program). For instance, an invocation is the runtime joinpoint on a method (static joinpoint). The static part of a given joinpoint can be generically retrieved using the property.

In the context of an interception framework, a runtime joinpoint is then the reification of an access to an accessible object (a method, a constructor, a field), i.e. the static part of the joinpoint. It is passed to the interceptors that are installed on the static joinpoint.

Proceeds to the next interceptor in the chain.

The implementation and semantics of this method depend on the actual joinpoint type. Consult the derived interfaces of this interface for specifics.

Consult the derived interfaces of this interface for specifics. If any of the interceptors at the joinpoint throws an exception.
Gets the static part of this joinpoint.

The static part is an accessible object on which a chain of interceptors are installed.

The static part of this joinpoint.
Gets the object that holds the current joinpoint's static part.

For instance, the target object for a method invocation.

The object that holds the current joinpoint's static part.
Gets the arguments to an invocation.

It is of course possible to change element values within this array to change the arguments to an intercepted invocation.

The arguments to an invocation.
Gets the method invocation that is to be invoked.

This property is a friendly implementation of the property. It should be used in preference to the property because it provides immediate access to the underlying method without the need to resort to a cast.

The method invocation that is to be invoked.
Gets the proxy object for the invocation. The proxy object for this method invocation. Gets the target object for the invocation. The target object for this method invocation. Gets the type of the target object. The type of the target object. The arguments (if any = may be ) to the method that is to be invoked. The target object that the method is to be invoked on. The AOP proxy for the target object. The method invocation that is to be invoked. The list of and that need dynamic checks. The declaring type of the method that is to be invoked. The index from 0 of the current interceptor we're invoking. Creates a new instance of the class.

This is an abstract class, and as such exposes no publicly visible constructors.

The list can also contain any s that need evaluation at runtime. s included in an must already have been found to have matched as far as was possible statically. Passing an array might be about 10% faster, but would complicate the code, and it would work only for static pointcuts.

The AOP proxy. The target object. the target method. The target method's arguments. The of the target object. The list of interceptors that are to be applied. May be . If the is .
Proceeds to the next interceptor in the chain. The return value of the method invocation. If any of the interceptors at the joinpoint throws an exception. Retrieves a new instance for the next Proceed method call. The current instance. The new instance to use. Performs sanity checks, whether the actual joinpoint may be invoked By default checks that the underlying target is not null and the called method is implemented by the target's type. if is null. if the 's type does not implement . Invokes the joinpoint.

Subclasses can override this to use custom invocation.

The return value of the invocation of the joinpoint. If invoking the joinpoint resulted in an exception.
A that represents the current invocation.

Does not invoke on the target object, as that too may be proxied.

A that represents the current invocation.
Gets the method invocation that is to be invoked.

May or may not correspond with a method invoked on an underlying implementation of that interface.

Gets the static part of this joinpoint. The proxied member's information. Gets the proxy that this interception was made through. The proxy that this interception was made through. Gets the target object for the invocation. The target object for this method invocation. Gets the type of the target object. The type of the target object. Gets and sets the arguments (if any - may be ) to the method that is to be invoked. The arguments (if any - may be ) to the method that is to be invoked. The list of method interceptors.

May be .

Gets the target object. Superclass for AOP proxy configuration managers.

Instances of this class are not themselves AOP proxies, but subclasses of this class are normally factories from which AOP proxy instances are obtained directly.

This class frees subclasses of the housekeeping of and instances, but doesn't actually implement proxy creation methods, the functionality for which is provided by subclasses.

Rod Johnson Aleksandar Seovic (.NET)
The list of advice.

If an is added, it will be wrapped in an advice before being added to this list.

Array updated on changes to the advisors list, which is easier to manipulate internally List of introductions. Array updated on changes to the advisors list, which is easier to manipulate internally Interface map specifying which object should interface methods be delegated to.

If entry value is methods should be delegated to the target object.

The for this instance. Set to when the first AOP proxy has been created, meaning that we must track advice changes via the OnAdviceChange() callback. The list of event listeners. The advisor chain factory. Creates a new instance of the class using the default advisor chain factory. Creates a new instance of the class. The interfaces that are to be proxied. If this Is the supplied (interface) proxied? The interface to test. if the supplied (interface) is proxied; if not or the supplied is . Adds the supplied to the end (or tail) of the advice (interceptor) chain. The to be added. Adds the supplied to the supplied in the advice (interceptor) chain. The zero (0) indexed position (from the head) at which the supplied is to be inserted into the advice (interceptor) chain. The to be added. If the supplied is ; or is not an reference; or if the supplied is a . Return the index (0 based) of the supplied in the interceptor (advice) chain for this proxy. The to search for. The zero (0) based index of this advisor, or -1 if the supplied is not an advisor for this proxy. Return the index (0 based) of the supplied in the introductions for this proxy. The to search for. The zero (0) based index of this advisor, or -1 if the supplied is not an introduction advisor for this proxy. Removes the supplied the list of advisors for this proxy. The advisor to remove. if advisor was found in the list of for this proxy and was successfully removed; if not or if the supplied is . If this proxy configuration is frozen and the cannot be removed. Removes the at the supplied in the list from the list of for this proxy. The index of the to remove. If this proxy configuration is frozen and the at the supplied cannot be removed; or if the supplied is out of range. Removes the supplied from the list of . The to remove. if the supplied was found in the list of and successfully removed. If this proxy configuration is frozen and the cannot be removed. Removes the supplied from the list of . The to remove. if the supplied was found in the list of and successfully removed. If this proxy configuration is frozen and the cannot be removed. Removes the at the supplied in the list of for this proxy. The index of the advisor to remove. If this proxy configuration is frozen and the at the supplied cannot be removed; or if the supplied is out of range. Adds the supplied to the list of . The index in the list at which the supplied is to be inserted. If -1, appends to the end of the list. The to add. If this proxy configuration is frozen and the cannot be added. Adds the supplied to the list of . The to add. If this proxy configuration is frozen and the cannot be added. Adds the advisors from the supplied to the list of . The to add advisors from. If this proxy configuration is frozen and the cannot be added. Adds the supplied to the list of . The index in the list at which the supplied is to be inserted. The to add. If this proxy configuration is frozen and the cannot be added. Adds the supplied to the list of . The to add. If this proxy configuration is frozen and the cannot be added. Replaces the that exists at the supplied in the list of with the supplied . The index of the in the list of that is to be replaced. The new (replacement) . If the supplied is out of range. Replaces the with the . The original (old) advisor to be replaced. The new advisor to replace the with. if the was replaced; if the was not found in the advisors collection (or the is , this method returns and (effectively) does nothing. If this proxy configuration is frozen and the cannot be replaced. As will normally be passed straight through to the advised target, this method returns the equivalent for the AOP proxy itself. A description of the proxy configuration. Registers the supplied as a listener for notifications. The to register. Removes the supplied . The to be removed. Adds a new interface to the list of interfaces that are proxied by this proxy. The interface to be proxied by this proxy. If this proxy configuration is frozen (); If the supplied is . Adds a new interface to the list of interfaces that are proxied by this proxy. The interface to be proxied by this proxy. Access is not synchronized. Removes the supplied (proxied) .

Does nothing if the supplied (proxied) isn't proxied.

The interface to remove. if the interface was removed.
Return the index (0 based) of the supplied in the interceptor (advice) chain for this proxy.

The return value of this method can be used to index into the list.

The to search for. The zero (0) based index of this interceptor, or -1 if the supplied is not an advice for this proxy.
Return the index (0 based) of the supplied in the interceptor (advice) chain for this proxy.

Acces is not synchronized

The return value of this method can be used to index into the list.

The to search for. The zero (0) based index of this interceptor, or -1 if the supplied is not an advice for this proxy.
Return the index (0 based) of the supplied in the interceptor (advice) chain for this proxy. The to search for. The zero (0) based index of this advisor, or -1 if the supplied is not an advisor for this proxy. Access is not synchronized. Return the index (0 based) of the supplied in the introductions for this proxy. The to search for. The zero (0) based index of this advisor, or -1 if the supplied is not an introduction advisor for this proxy. Access is not synchronized Removes the at the supplied in the list from the list of for this proxy. The index of the to remove. If this proxy configuration is frozen and the at the supplied cannot be removed; or if the supplied is out of range. Does not synchronize access. Is the supplied included in any advisor? The to check for the inclusion of. if the supplied could be run in an invocation (this does not imply that said will be run). Returns a count of all of the type-compatible with the supplied . The of the to check. A count of all of the type-compatible with the supplied . Throws an if this instances proxy configuration data is frozen. The message that will be passed through to the constructor of any thrown . If the configuration for this proxy is frozen. Bring the advisors array up to date with the list. Bring the introductions array up to date with the list. Callback method that is invoked when the list of proxied interfaces has changed.

An example of such a change would be when a new introduction is added. Resetting to will cause a new proxy to be generated on the next call to get a proxy.

Callback method that is invoked when the interceptor list has changed. Activates this instance. Creates an AOP proxy using this instance's configuration data.

Subclasses must not create a proxy by any other means (at least without having a well thought out and cogent reason for doing so). This is because the implementation of this method performs some required housekeeping logic prior to creating an AOP proxy.

Copies the configuration from the supplied other into this instance.

Useful when this instance has been created using the no-argument constructor, and needs to get all of its confiuration data from another (most usually to have an independant copy of said configuration data).

The instance containing the configiration data that is to be copied into this instance.
A that represents the current configuration. A that represents the current configuration. A that represents the current configuration. A that represents the current configuration. Helper method that adds the names of all of the proxied interfaces to the buffer of the supplied . The to append the proxied interface names to. Helper method that adds advisor's to the buffer of the supplied . The to append the advisor details to. Gets all of the interfaces implemented by the of the supplied . The object to get the interfaces of. All of the interfaces implemented by the of the supplied . If the supplied is . Gets and sets the implementation that will be used to get the interceptor chains for the advised . The implementation that will be used to get the interceptor chains for the advised . Returns the current used by this object. The used by this object. Returns a boolean specifying if this instance can be serialized. true if this instance can be serialized, false otherwise. Returns the collection of interface s to be (or that are being) proxied by this proxy. The collection of interface s to be (or that are being) proxied by this proxy. Returns the mapping of the proxied interface s to their delegates. The mapping of the proxied interface s to their delegates. Returns the collection of instances that have been applied to this proxy. The collection of instances that have been applied to this proxy. Returns the collection of instances that have been applied to this proxy.

Will never return , but may return an empty array (in the case where no instances have been applied to this proxy).

The collection of instances that have been applied to this proxy.
Gets the target type behind the implementing object. Ttypically a proxy configuration or an actual proxy. The type of the target or null if not known. Sets the target object that is to be advised.

This is a convenience write-only property that allows client code to set the target object... the target object will be implicitly wrapped within a new instance.

Called by subclasses to get a value indicating whether any AOP proxies have been created yet. true if this AOp proxies have been created; otherwise, false. Specifies the of proxies that are to be created for this instance of proxy config.

If this property value is it simply means that no proxies have been created yet. Only when the first proxy is created will this property value be set by the AOP framework.

Users will be able to add interceptors dynamically without proxy regeneration, but if they add introductions the proxy will have to be regenerated.

The of proxies that are to be created for this instance of proxy config; if no proxies have been created yet.
Caches proxy constructor for performance reasons. Utility methods for use by implementations.

Not intended to be used directly by applications.

Rod Johnson Aleksandar Seovic (.NET)
Gets the list of interceptors and dynamic interception advice that may apply to the supplied invocation. The proxy configuration. The object proxy. The method to evaluate interceptors for. The of the target object. A of (if there's a dynamic method matcher that needs evaluation at runtime). Creates a new instance of the class.

This is a utility class, and as such has no publicly visible constructors.

Thrown in response to the misconfiguration of an AOP proxy. Rod Johnson Aleksandar Seovic (.NET) Creates a new instance of the class. Creates a new instance of the class with the specified message. A message about the exception. Creates a new instance of the class with the specified message and root cause. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. This class contains various methods used to obtain information about the current AOP invocation.

The property is usable if the AOP framework is configured to expose the current proxy (not the default)... it returns the AOP proxy in use. Target objects or advice can use this to make advised calls. They can also use it to find advice configuration.

To expose the current proxy, set the property on the controlling proxy to . The default value for the property is , for performance reasons.

The AOP framework does not expose proxies by default, as there is a performance cost in doing so.

The functionality in this class might be used by a target object that needed access to resources on the invocation. However, this approach should not be used when there is a reasonable alternative, as it makes application code dependent on usage under AOP and the Spring.NET AOP framework.

Rod Johnson Aleksandar Seovic (.NET)
Sets the current proxy by pushing it to the proxy stack.

This method is for internal use only, and should never be called by client code.

The proxy to put on top of the proxy stack.
Removes the current proxy from the proxy stack, making the previous proxy (if any) the current proxy.

This method is for internal use only, and should never be called by client code.

If the proxy stack is empty.
Creates a new instance of the class.

This is a utility class, and as such exposes no public constructors.

The AOP proxy stack associated with this thread. Indicates if the current call is executed under control of an AOP proxy.

Will be unless the property on the controlling proxy has been set to .

The default value for the property is , for performance reasons.

Gets the current AOP proxy. If the proxy stack is empty. Utility methods used by the AOP framework.

Not intended to be used directly by applications.

Rod Johnson Juergen Hoeller Aleksandar Seovic (.NET)
Is the supplied an AOP proxy? Return whether the given object is either a composition-based proxy or a decorator-based proxy. The instance to be checked. if the supplied is an AOP proxy. Is the supplied a composition-based AOP proxy? The instance to be checked. if the supplied is an composition-based AOP proxy. Is the supplied a decorator-based AOP proxy? The instance to be checked. if the supplied is an decorator-based AOP proxy. Gets all of the interfaces that the of the supplied implements.

This includes interfaces implemented by any superclasses.

The object to analyse for interfaces. All of the interfaces that the of the supplied implements; or an empty array if the supplied is .
Gets all of the interfaces that the supplied implements. This includes interfaces implemented by any superclasses. The type to analyse for interfaces. All of the interfaces that the supplied implements. Can the supplied apply at all on the supplied ?

This is an important test as it can be used to optimize out a pointcut for a class.

Invoking this method with a that is an interface type will always yield a return value.

The pointcut being tested. The class being tested. The interfaces being proxied. If , all methods on a class may be proxied. if the pointcut can apply on any method.
Can the supplied apply at all on the supplied ?

This is an important test as it can be used to optimize out an advisor for a class.

The advisor to check. The class being tested. The interfaces being proxied. If , all methods on a class may be proxied. if the advisor can apply on any method.
Creates a new instance of the class.

This is a utility class, and as such has no publicly visible constructors.

Gets the type of the target. The candidate. Invokes a target method using dynamic reflection. Aleksandar Seovic Bruno Baia The method invocation that is to be invoked on the proxy. Creates a new instance of the class. The AOP proxy. The target object. The target method proxied. The method to invoke on proxy. The target method's arguments. The of the target object. The list of interceptors that are to be applied. May be . If any of the or parameters is . Invokes the joinpoint using dynamic reflection.

Subclasses can override this to use custom invocation.

The return value of the invocation of the joinpoint. If invoking the joinpoint resulted in an exception.
Creates a new instance from the specified and increments the interceptor index. The current instance. The new instance to use. Decorates a target source with the interface.

This implementation will release the target object when said object is disposed.

Aleksandar Seovic
Decorates a target source with the interface. Aleksandar Seovic Returns the target object that proxy methods will be delegated to. The target object. Creates a new instance of the class. The target object that proxy methods will be delegated to. If the supplied is . Returns the target object that proxy methods will be delegated to. The target object. Releases the dynamic target when this object is disposed. implementation that caches advisor chains on a per-advised-method basis. Rod Johnson Aleksandar Seovic (.NET) Factory interface for advisor chains. Rod Johnson Aleksandar Seovic (.NET) Callback interface for listeners.

Allows implementations to be notified of notable lifecycle events relating to the creation of a proxy, and changes to the configuration data of a proxy.

Rod Johnson Aleksandar Seovic (.NET)
Invoked when the first proxy is created. The relevant source. Invoked when advice is changed after a proxy is created. The relevant source. Invoked when interfaces are changed after a proxy is created. The relevant source. Gets the list of and instances for the supplied . The proxy configuration object. The object proxy. The method for which the interceptors are to be evaluated. The of the target object. The list of and instances for the supplied . Gets the list of and instances for the supplied . The proxy configuration object. The object proxy. The method for which the interceptors are to be evaluated. The of the target object. The list of and instances for the supplied . Invoked when the first proxy is created. The relevant source. Invoked when advice is changed after a proxy is created. The relevant source. Invoked when interfaces are changed after a proxy is created. The relevant source. Internal framework class. This class is required because if we put an interceptor that implements IInterceptionAdvice in the interceptor list passed to MethodInvocation, it may be mistaken for an advice that requires dynamic method matching. Rod Johnson Aleksandar Seovic (.Net) Provides access to the target object of an AOP proxy.

To be implemented by introduction aspects in order to obtain access to the target object.

Aleksandar Seovic
Sets the target object. Factory for AOP proxies for programmatic use, rather than via a Spring.NET IoC container.

This class provides a simple way of obtaining and configuring AOP proxies in code.

Rod Johnson Aleksandar Seovic (.NET)
Creates a new instance of the class. Creates a new instance of the class that proxys all of the interfaces exposed by the supplied . The object to proxy. If the is . Creates a new instance of the class that has no target object, only interfaces.

Interceptors must be added if this factory is to do anything useful.

The interfaces to implement.
Creates a new proxy according to the settings in this factory.

Can be called repeatedly; the effect of repeated invocations will (of course) vary if interfaces have been added or removed.

An AOP proxy for target object.
Creates a new proxy for the supplied and .

This is a convenience method for creating a proxy for a single interceptor.

The interface that the proxy must implement. The interceptor that the proxy must invoke. A new AOP proxy for the supplied and .
implementation to source AOP proxies from a Spring.NET IoC container (an ).

s and s are identified by a list of object names in the current container.

Global interceptors and advisors can be added at the factory level (that is, outside the context of a definition). The specified interceptors and advisors are expanded in an interceptor list (see ) where an 'xxx*' wildcard-style entry is included in the list, matching the given prefix with the object names. For example, 'global*' would match both 'globalObject1' and 'globalObjectBar', and '*' would match all defined interceptors. The matching interceptors get applied according to their returned order value, if they implement the interface. An interceptor name list may not conclude with a global 'xxx*' pattern, as global interceptors cannot invoke targets.

It is possible to cast a proxy obtained from this factory to an reference, or to obtain the reference and programmatically manipulate it. This won't work for existing prototype references, which are independent... however, it will work for prototypes subsequently obtained from the factory. Changes to interception will work immediately on singletons (including existing references). However, to change interfaces or the target it is necessary to obtain a new instance from the surrounding container. This means that singleton instances obtained from the factory do not have the same object identity... however, they do have the same interceptors and target, and changing any reference will change all objects.

Rod Johnson Juergen Hoeller Federico Spinazzi (.NET) Choy Rim (.NET) Mark Pollack (.NET) Aleksandar Seovic (.NET)
This suffix in a value in an interceptor list indicates to expand globals. The shared instance for this class. Is the object managed by this factory a singleton or a prototype? The cached instance if this proxy factory object is a singleton. The owning object factory (which cannot be changed after this object is initialized). The mapping from an or interceptor to an object name (or ), depending on where it was sourced from.

If it's sourced from object name, it will need to be refreshed each time a new prototype instance is created.

Names of interceptors and pointcut objects in the factory.

Default is for globals expansion only.

Names of introductions and pointcut objects in the factory.

Default is for globals expansion only.

The name of the target object(in the enclosing ). Creates an instance of the AOP proxy to be returned by this factory

Invoked when clients obtain objects from this factory object. The (proxy) instance will be cached for a singleton, and created on each call to for a prototype.

A fresh AOP proxy reflecting the current state of this factory.
Create the advisor (interceptor) chain. The advisors that are sourced from an ObjectFactory will be refreshed each time a new prototype instance is added. Interceptors added programmatically through the factory API are unaffected by such changes. Configures introductions for this proxy. Add all global interceptors and pointcuts. Add all global introductions. Add the given interceptor or pointcut to the interceptor list. interceptor or pointcut to add object name from which we obtained this object in our owning object factory Add the introduction to the introduction list. If specified parameter is IIntroducionAdvisor it is added directly, otherwise it is wrapped with DefaultIntroductionAdvisor first. introducion to add object name from which we obtained this object in our owning object factory Refresh named objects from the interceptor chain. We need to do this every time a new prototype instance is returned, to return distinct instances of prototype interfaces and pointcuts. Refreshes target object for prototype instances. Refresh named objects from the interceptor chain. We need to do this every time a new prototype instance is returned, to return distinct instances of prototype interfaces and pointcuts. Wraps pointcut or interceptor with appropriate advisor pointcut or interceptor that needs to be wrapped with advisor Advisor Wraps target with SingletonTargetSource if necessary target or target source object target source passed or target wrapped with SingletonTargetSource Wraps introduction with IIntroductionAdvisor if necessary object to wrap Introduction advisor No need to do anything when advice change, proxy can handle those changes by itself. Implementation of listener for AdvisedSupport.InterfacesChanged event event source Sets the names of the interfaces that are to be implemented by the proxy. The names of the interfaces that are to be implemented by the proxy. If the supplied value (or any of its elements) is ; or if any of the element values is not the (assembly qualified) name of an interface type. Sets the name of the target object being proxied.

Only works when the property is set; it is a logic error on the part of the programmer if this value is set and the accompanying is not also set.

The name of the target object being proxied.
Sets the list of and object names.

This property must always be set (configured) when using a in an context.

The list of and object names.
Sets the list of introduction object names.

Only works when the property is set; it is a logic error on the part of the programmer if this value is set and the accompanying is not supplied.

The list of introduction object names. .
Callback that supplies the owning factory to an object instance. Owning (may not be ). The object can immediately call methods on the factory. In case of initialization errors. Return the of the proxy. Will check the singleton instance if already created, else fall back to the proxy interface (if a single one), the target bean type, or the TargetSource's target class. Return the of object that this creates, or if not known in advance. Is the object managed by this factory a singleton or a prototype? Invokes a target method using standard reflection. Rod Johnson Aleksandar Seovic (.NET) Rick Evans (.NET) Bruno Baia (.NET) The method invocation that is to be invoked on the proxy. Creates a new instance of the class. The AOP proxy. The target object. The target method proxied. The method to invoke on proxy. The target method's arguments. The of the target object. The list of interceptors that are to be applied. May be . If any of the or parameters is . Invokes the joinpoint using standard reflection.

Subclasses can override this to use custom invocation.

The return value of the invocation of the joinpoint. If invoking the joinpoint resulted in an exception.
Creates a new instance from the specified and increments the interceptor index. The current instance. The new instance to use. Decorates a target source with the interface.

Because the target source is static, the target object can be cached and simply returned as is.

Aleksandar Seovic
Creates a new instance of the class. The target object that proxy methods will be delegated to. If the supplied is . Returns the target object that proxy methods will be delegated to. The target object. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. This is a no-op operation in this implementation. Abstract PointcutAdvisor that allows for any Advice to be configured. Juergen Hoeller Mark Pollack (.NET) Abstract base class for implementations. Can be subclassed for returning a specific pointcut/advice or a freely configurable pointcut/advice. Rod Johnson Juergen Hoeller Mark Pollack (.NET) Superinterface for all s that are driven by a pointcut.

This covers nearly all advisors except introduction advisors, for which method-level matching does not apply.

Rod Johnson Aleksandar Seovic (.NET)
Base interface holding AOP advice and a filter determining the applicability of the advice (such as a pointcut). This interface is not for use by Spring.NET users, but exists rather to allow for commonality in the support for different types of advice within the framework.

Spring.NET AOP is centered on around advice delivered via method interception, compliant with the AOP Alliance interception API. The interface allows support for different types of advice, such as before and after advice, which need not be implemented using interception.

Rod Johnson Aleksandar Seovic (.NET)
Is this advice associated with a particular instance?

An advisor that was creating a mixin would be a per instance operation and would thus return . If the advisor is not per instance, it is shared with all instances of the advised class obtained from the same Spring.NET IoC container.

Use singleton and prototype object definitions or appropriate programmatic proxy creation to ensure that s have the correct lifecycle model.

This method is not currently used by the framework.
if this advice is associated with a particular instance.
Return the advice part of this aspect.

An advice may be an interceptor, a throws advice, before advice, introduction etc.

The advice that should apply if the pointcut matches.
The that drives this advisor. Determines whether the specified is equal to the current . The advisor to compare with. if this instance is equal to the specified . Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. A hash code for the current . Returns this s order in the interception chain. This s order in the interception chain. Return the advice part of this aspect.

An advice may be an interceptor, a throws advice, before advice, introduction etc.

The advice that should apply if the pointcut matches.
Is this advice associated with a particular instance?

Not supported for dynamic advisors.

if this advice is associated with a particular instance. Always.
The that drives this advisor. Returns a that represents the current . A representation of this advisor. Return the advice part of this advisor. The advice that should apply if the pointcut matches. Abstract ObjectFactory-based IPointcutAdvisor that allows for any Advice to be configured as reference to an Advice object in an ObjectFactory. specifying the name of an advice object instead of the advice object itself (if running within an ObjectFactory/ApplicationContext increses loose coupling at initialization time, in order not to initialize the advice object until the pointcut actually matches. Juergen Hoeller Mark Pollack Describe this Advisor, showing name of advice object. Type name and advice object name. Gets or sets the name of the advice object that this advisor should refer to. An instance of the specified object will be obtained on first access of this advisor's advice. This advisor will only ever obtain at most one single instance of the advice object, caching the instance for the lifetime of the advisor. The name of the advice object. Callback that supplies the owning factory to an object instance. Owning (may not be ). The object can immediately call methods on the factory.

Invoked after population of normal object properties but before an init callback like 's method or a custom init-method.

In case of initialization errors.
Return the advice part of this aspect.

An advice may be an interceptor, a throws advice, before advice, introduction etc.

The advice that should apply if the pointcut matches.
Abstract base regular expression pointcut object.

The regular expressions must be a match. For example, the .*Get.* pattern will match Com.Mycom.Foo.GetBar(), and Get.* will not.

This base class is serializable. Subclasses should decorate all fields with the - the method in this class will be invoked again on the client side on deserialization.

Rod Johnson Juergen Hoeller Simon White (.NET)
Convenient superclass when one wants to force subclasses to implement the interface but subclasses will still want to be pointcuts.

The property can be overriden to customize filter behavior as well.

Rod Johnson Aleksandar Seovic (.NET) Mark Pollack (.NET)
Convenient abstract superclass for static method matchers that don't care about arguments at runtime. Rod Johnson Aleksandar Seovic (.NET) That part of an that checks whether a target method is eligible for advice.

An may be evaluated statically or at runtime (dynamically). Static matching involves only the method signature and (possibly) any s that have been applied to a method. Dynamic matching additionally takes into account the actual argument values passed to a method invocation.

If the value of the property of an implementation instance returns , evaluation can be performed statically, and the result will be the same for all invocations of this method, whatever their arguments. This means that if the value of the is , the three argument method will never be invoked for the lifetime of the .

If an implementation returns in its two argument method, and the value of it's property is , the three argument method will be invoked immediately before each and every potential execution of the related advice, to decide whether the advice should run. All previous advice, such as earlier interceptors in an interceptor chain, will have run, so any state changes they have produced in parameters or thread local storage, will be available at the time of evaluation.

Rod Johnson Aleksandar Seovic (.NET)
Does the supplied satisfy this matcher?

This is a static check. If this method invocation returns ,or if the property is , then no runtime check will be made.

The candidate method. The target (may be , in which case the candidate must be taken to be the 's declaring class). if this this method matches statically.
Is there a runtime (dynamic) match for the supplied ?

In order for this method to have even been invoked, the supplied must have matched statically. This method is invoked only if the two argument method returns for the supplied and , and if the property is .

Invoked immediately before any potential running of the advice, and after any advice earlier in the advice chain has run.

The candidate method. The target . The arguments to the method if there is a runtime match.
Is this dynamic?

If , the three argument method will be invoked if the two argument method returns .

Note that this property can be checked when an AOP proxy is created, and implementations need not check the value of this property again before each method invocation.

if this is dynamic.
Is there a runtime (dynamic) match for the supplied ?

Always throws a . This method should never be called on a static matcher.

The candidate method. The target . The arguments to the method Always throws a . Always.
Does the supplied satisfy this matcher?

Must be implemented by a derived class in order to specify matching rules.

The candidate method. The target (may be , in which case the candidate must be taken to be the 's declaring class). if this this method matches statically.
Override in case you need to initialized non-serialized fields on deserialization. Is this dynamic?

Always returns .

Always returns .
Spring.NET's core pointcut abstraction.

A pointcut is composed of s and s. Both these basic terms and an itself can be combined to build up sophisticated combinations.

Rod Johnson Aleksandar Seovic (.NET)
The for this pointcut. The current . The for this pointcut. The current . Creates a new instance of the class.

This is an abstract class, and as such has no publicly visible constructors.

The for this pointcut. The current . The for this pointcut. The current . A filter that restricts the matching of a pointcut or introduction to a given set of target types.

Can be used as part of a pointcut, or for the entire targeting of an introduction.

Rod Johnson Aleksandar Seovic (.NET)
Should the pointcut apply to the supplied ? The candidate . if the advice should apply to the supplied Creates a new instance of the class.

This is an abstract class, and as such has no publicly visible constructors.

Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. If an error was encountered during the deserialization process. Overridden to ensure proper initialization Populates a with the data needed to serialize the target object. The to populate with data. The destination (see ) for this serialization. Subclasses must implement this to initialize regular expression pointcuts.

Can be invoked multiple times.

This method will be invoked from the property, and also on deserialization.

The patterns to initialize. In the case of an invalid pattern.
Does the pattern at the supplied match this ? The pattern to match The index of pattern. if there is a match. Does the supplied satisfy this matcher?

Try to match the regular expression against the fully qualified name of the method's declaring , plus the name of the supplied .

Note that the declaring is that that originally declared the method, not necessarily the that is currently exposing it. For example, matches any subclass of 's method.

The candidate method. The target (may be , in which case the candidate must be taken to be the 's declaring class). if this this method matches statically.
Should the pointcut apply to the supplied ?

In this instance, simply returns .

The candidate . if the advice should apply to the supplied
The for this pointcut. The current . Convenience property for setting a single pattern. Use this property or Patterns, not both. The regular expressions defining methods to match. Matching will be the union of all these; if any match, the pointcut matches. Pointcut that looks for a specific attribute being present on a class or method. Juergen Hoeller Mark Pollack (.NET) Initializes a new instance of the class for the given attribute type. Type of the attribute to look for at the class level. Initializes a new instance of the class for the given attribute type Type of the attribute. if set to true [check inherited]. Initializes a new instance of the class for the given attribute type The attribute type to look for at the class level. The attribute type to look for at the method attribute. The for this pointcut. The current . The for this pointcut. The current . implementation that matches methods that have been decorated with a specified . Aleksandar Seovic Ronald Wildenberg Creates a new instance of the class. Creates a new instance of the class. The to match. Creates a new instance of the class. The to match. Flag that controls whether or not the inheritance tree of the method to be included in the search for the ? Creates a new instance of the class. The to match. Flag that controls whether or not the inheritance tree of the method to be included in the search for the ? Flag that controls whether or not interfaces attributes of the method to be included in the search for the ? Does the supplied satisfy this matcher? The candidate method. The target (may be , in which case the candidate must be taken to be the 's declaring class). if this this method matches statically. The to match. If the supplied value is not a that derives from the class. Is the inheritance tree of the method to be included in the search for the ?

The default is .

Is the interfaces attributes of the method to be included in the search for theg ?

The default is .

Convenient class for attribute-match method pointcuts that hold an Interceptor, making them an Advisor. Bruno Baia Creates a new instance of the class. Creates a new instance of the class for the supplied . Is this advice associated with a particular instance? if this advice is associated with a particular instance. Always; this property is not yet supported. Returns this s order in the interception chain. This s order in the interception chain. Return the advice part of this advisor. The advice that should apply if the pointcut matches. The that drives this advisor. MethodMatcher that looks for a specific attribute being present on the method (checking both the method on the onviked interface, if any and the corresponding method on the target class Juergen hoeller Mark Pollack Initializes a new instance of the class for the given atribute type. Type of the attribute to look for. Does the supplied satisfy this matcher? The candidate method. The target (may be , in which case the candidate must be taken to be the 's declaring class). if this this method matches statically.

Must be implemented by a derived class in order to specify matching rules.

ITypeFilter that looks for a specific attribute being present on a class Juergen Hoeller Mark Pollack (.NET) Initializes a new instance of the class for the given attribute type. Type of the attribute to look for. Initializes a new instance of the class for the given attribute type. Type of the attribute. if set to true [check inherited]. Should the pointcut apply to the supplied ? The candidate . if the advice should apply to the supplied The attribute for this filter. Indicates, whether this filter considers base types for filtering. Convenient class for building up pointcuts.

All methods return a instance, which facilitates the following concise usage pattern...

IPointcut pointcut = new ComposablePointcut() .Union(typeFilter) .Intersection(methodMatcher) .Intersection(pointcut);

There is no Union() method on this class. Use the method for such functionality.

Rod Johnson Aleksandar Seovic (.NET)
Creates a new instance of the class that matches all the methods on all s. Creates a new instance of the class that uses the supplied and . The type filter to use. The method matcher to use. Changes the current type filter to be the union of the existing filter and the supplied . The filter to union with. The union of the existing filter and the supplied . Changes the current type filter to be the intersection of the existing filter and the supplied . The filter to diff against. The intersection of the existing filter and the supplied . Changes the current method matcher to be the union of the existing matcher and the supplied . The matcher to union with. The union of the existing matcher and the supplied . Changes the current method matcher to be the intersection of the existing matcher and the supplied . The matcher to diff against. The intersection of the existing matcher and the supplied . Changes current pointcut to intersection of the current and supplied pointcut pointcut to diff against updated pointcut The for this pointcut. The current . The for this pointcut. The current . Pointcut and method matcher for use in simple cflow-style pointcuts.

Evaluating such pointcuts is slower than evaluating normal pointcuts, but can nevertheless be useful in some cases. Of course, your mileage may vary as to what 'slower' actually means.

Rod Johnson Simon White (.NET)
Creates a new instance of the class. The class under which all control flows are to be matched. Construct a new pointcut that matches all calls below the given method in the given class.

If the supplied is , all control flows below the given class will be successfully matched.

The class under which all control flows are to be matched. The method name under which all control flows are to be matched.
Should the pointcut apply to the supplied ?

Subclasses are encouraged to override this method for greater filtering (and performance).

This, the default, implementation always matches (returns ).

The candidate target class. if the advice should apply to the supplied
Does the supplied satisfy this matcher? Perform static checking. If this returns false, or if the isRuntime() method returns false, no runtime check will be made.

Subclasses are encouraged to override this method if it is possible to filter out some candidate classes.

This, the default, implementation always matches (returns ). This means that the three argument method will always be invoked.

The candidate method. The target class (may be , in which case the candidate class must be taken to be the 's declaring class). if this this method matches statically.
Is there a runtime (dynamic) match for the supplied ?

Subclasses are encouraged to override this method if it is possible to filter out some candidate classes.

The candidate method. The target class. The arguments to the method if there is a runtime match.
The for this pointcut. The current . Gets the number of times this pointcut has been evaluated.

Useful as a debugging aid.

Note that this value is distinct from the number of times that this pointcut sucessfully matches a target method, in that a may be evaluated many times but never actually match even once.

The number of times this pointcut has been evaluated.
The for this pointcut. The current . Is this a runtime pointcut?

This implementation is a runtime pointcut, and so always returns .

if this is a runtime pointcut.
Simple implementation that by default applies to any class. Rod Johnson Aleksandar Seovic (.NET) Superinterface for advisors that perform one or more AOP introductions.

This interface cannot be implemented directly; subinterfaces must provide the advice type implementing the introduction.

Introduction is the implementation of additional interfaces (not implemented by a target) via AOP advice.

Rod Johnson Aleksandar Seovic (.NET)
Can the advised interfaces be implemented by the introduction advice?

Invoked before adding an .

If the advised interfaces cannot be implemented by the introduction advice.
Returns the filter determining which target classes this introduction should apply to.

This is the part of a pointcut. Be advised that method matching doesn't make sense in the context of introductions.

The filter determining which target classes this introduction should apply to.
Gets the interfaces introduced by this . The interfaces introduced by this . Creates a new instance of the class using the supplied

This constructor adds all interfaces implemented by the supplied (except the interface) to the list of interfaces to introduce.

The introduction to use.
Creates a new instance of the class using the supplied The introduction to use. The interface to introduce. Creates a new instance of the class using the supplied The introduction to use. The interfaces to introduce. If the supplied is . Adds the supplied to the list of introduced interfaces. The interface to add. If any of the are not interface . Should the pointcut apply to the supplied ?

This, the default, implementation always returns .

The candidate . if the advice should apply to the supplied
Can the advised interfaces be implemented by the introduction advice?

Invoked before adding an .

If the advised interfaces cannot be implemented by the introduction advice. If any of the are not interface .
Returns the filter determining which target classes this introduction should apply to. The filter determining which target classes this introduction should apply to. Gets the interfaces introduced by this . The interfaces introduced by this . Is this advice associated with a particular instance?

Default for an introduction is per-instance interception.

if this advice is associated with a particular instance.
Return the advice part of this aspect. The advice that should apply if the pointcut matches. Concrete ObjectFactory-based IPointcutAdvisor thta allows for any Advice to be configured as reference to an Advice object in the ObjectFatory, as well as the Pointcut to be configured through an object property. Specifying the name of an advice object instead of the advice object itself (if running within a ObjectFactory/ApplicationContext) increases loose coupling at initialization time, in order to not intialize the advice object until the pointcut actually matches. Juerge Hoeller Mark Pollack Describe this Advisor, showing pointcut and name of advice object. Type name , pointcut, and advice object name. The that drives this advisor. Convenient pointcut-driven advisor implementation.

This is the most commonly used implementation. It can be used with any pointcut and advice type, except for introductions.

Rod Johnson Aleksandar Seovic (.NET)
Creates a new instance of the class. Creates a new instance of the class for the supplied , The advice to use. Creates a new instance of the class for the supplied and . The advice to use. The pointcut to use. Returns a that represents the current . A representation of this advisor. The that drives this advisor. Convenient abstract superclass for dynamic method matchers that do care about arguments at runtime. Rod Johnson Aleksandar Seovic (.NET) Creates a new instance of the class.

This is an class, and as such exposes no public constructors.

Does the supplied satisfy this matcher?

Derived classes can override this method to add preconditions for dynamic matching.

This implementation always returns .

The candidate method. The target (may be , in which case the candidate must be taken to be the 's declaring class). if this this method matches statically.
Is there a runtime (dynamic) match for the supplied ?

Must be overriden by derived classes to provide criteria for dynamic matching.

The candidate method. The target . The arguments to the method if there is a runtime match.
Is this dynamic? Always returns , to specify that this is a dynamic matcher. Convenient superclass for s that are also dynamic pointcuts. Rod Johnson Aleksandar Seovic (.NET) Creates a new instance of the class.

This is an abstract class, and as such has no publicly visible constructors.

Creates a new instance of the class for the supplied .

This is an abstract class, and as such has no publicly visible constructors.

The advice portion of this advisor.
Is this advice associated with a particular instance?

Not supported for dynamic advisors.

if this advice is associated with a particular instance. Always.
The for this pointcut.

This implementation always returns a filter that evaluates to for any .

The current .
The for this pointcut.

This implementation always returns itself (this object).

The current .
Returns this s order in the interception chain. This s order in the interception chain. Return the advice part of this aspect. The advice that should apply if the pointcut matches. The that drives this advisor.

This implementation always returns itself (this object).

Various utility methods relating to the composition of s.

A method matcher may be evaluated statically (based on method and target class) or need further evaluation dynamically (based on arguments at the time of method invocation).

Rod Johnson Aleksandar Seovic (.NET)
Creates a new that is the union of the two supplied s.

The newly created matcher will match all the methods that either of the two supplied matchers would match.

The first method matcher. The second method matcher. A new that is the union of the two supplied s
Creates a new that is the intersection of the two supplied s.

The newly created matcher will match only those methods that both of the supplied matchers would match.

The first method matcher. The second method matcher. A new that is the intersection of the two supplied s
Creates a new instance of the class.

This is a utility class, and as such has no publicly visible constructors.

Pointcut object for simple method name matches, useful as an alternative to pure regular expression based patterns. Juergen Hoeller Aleksandar Seovic (.NET) Does the of the supplied matches any of the mapped names? The to check. The of the target class. if the name of the supplied matches one of the mapped names. Does the supplied match the supplied ?

The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. Can be overridden in subclasses.

The method name of the class. The name in the descriptor. True if the names match.
Convenience property when we have only a single method name to match. Use either this property or the property, not both. Set the method names defining methods to match.

Matching will be the union of all these; if any match, the pointcut matches.

Convenient class for name-match method pointcuts that hold an Interceptor, making them an Advisor. Juergen Hoeller Aleksandar Seovic (.NET) Mark Pollack (.NET) Creates a new instance of the class. Creates a new instance of the class for the supplied . The for this pointcut. Default is The current . Convenience property when we have only a single method name to match. Use either this property or the property, not both. Set the method names defining methods to match.

Matching will be the union of all these; if any match, the pointcut matches.

The that drives this advisor. Various related utility methods.

These methods are particularly useful for composing pointcuts using the union and intersection methods.

Rod Johnson Aleksandar Seovic (.NET)
Creates a union of the two supplied pointcuts. The first pointcut. The second pointcut. The union of the two supplied pointcuts. Creates an that is the intersection of the two supplied pointcuts. The first pointcut. The second pointcut. An that is the intersection of the two supplied pointcuts. Performs the least expensive check for a match. The to be evaluated. The candidate method. The target . The arguments to the method if there is a runtime match. Are the supplied s equal? The first pointcut. The second pointcut. if the supplied s are equal. Creates a new instance of the class.

This is a utility class, and as such has no publicly visible constructors.

Convenient class for regular expression method pointcuts that hold an , making them an .

Configure this class using the and pass-through properties. These are analogous to the and s properties of the class.

Can delegate to any type of regular expression pointcut. Currently only pointcuts based on the regular expression classes from the .NET Base Class Library are supported. The property must be a subclass of the class.

This should not normally be set directly.

Dmitriy Kopylenko Rod Johnson Simon White (.NET) Mark Pollack (.NET)
Creates a new instance of the class. Creates a new instance of the class for the supplied . The target advice. Initialises the pointcut. A single pattern to be used during method evaluation. Multiple patterns to be used during method evaluation. The that drives this advisor. Simple implementation that matches all classes classes (and any derived subclasses) of a give root . Rod Johnson Aleksandar Seovic (.NET) Creates a new instance of the for the supplied . The root . If the supplied is . Should the pointcut apply to the supplied ?

Returns if the supplied can be assigned to the root .

The candidate . if the advice should apply to the supplied
Regular expression based pointcut object.

Uses the regular expression classes from the .NET Base Class Library.

The regular expressions must be a match. For example, the .*Get* pattern will match Com.Mycom.Foo.GetBar(), and Get.* will not.

Rod Johnson Simon White (.NET)
Creates a new instance of the class. Creates a new instance of the class, using the supplied pattern or . The intial pattern value(s) to be matched against. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. If an error was encountered during the deserialization process. Initializes the regular expression pointcuts.

Can be invoked multiple times.

This method will be invoked from the property, and also on deserialization.

The patterns to initialize. In the case of an invalid pattern. If the supplied is .
Does the pattern at the supplied match this ? The pattern to match The index of pattern. if there is a match. Gets or sets default options that should be used by regular expressions that don't have options explicitly set. Default options that should be used by regular expressions that don't have options explicitly set. Convenient superclass for s that are also static pointcuts. Rod Johnson Aleksandar Seovic (.Net) Creates a new instance of the class.

This is an abstract class, and as such has no publicly visible constructors.

Creates a new instance of the class for the supplied

This is an abstract class, and as such has no publicly visible constructors.

The advice to use.
Is this advice associated with a particular instance? if this advice is associated with a particular instance. Always; this property is not yet supported. Returns this s order in the interception chain. This s order in the interception chain. Return the advice part of this advisor. The advice that should apply if the pointcut matches. The that drives this advisor. Defines miscellaneous filter operations. Rod Johnson Aleksandar Seovic (.Net) Creates a union of two filters.

The filter arising from the union will match all of the that either of the two supplied filters would match.

The first filter. The second filter. The union of the supplied filters.
Creates the intersection of two filters.

The filter arising from the intersection will match all of the that both of the two supplied filters would match.

The first filter. The second filter. The intersection of the supplied filters.
Creates a new instance of the class.

This is a utility class, and as such has no publicly visible constructors.

Union class filter implementation. Intersection implementation. Simple implementation that matches a given 's against . For a list of supported pattern syntax see . Erich Eichinger Creates a new instance of using a list of given . the list patterns to match typenames against. Must not be null. Does the supplied type's match any of the ? The candidate . if the matches any of the . Returns the list of type name patterns for this filter. A union.

Such pointcut unions are tricky, because one cannot simply OR the respective s: one has to ascertain that each 's is also satisfied.

Rod Johnson Aleksandar Seovic (.NET)
Creates a new instance of the class. The first pointcut. The second pointcut. The for this pointcut. The current . The for this pointcut. The current . Internal method matcher class for union pointcut. Abstract superclass for pooling s.

Maintains a pool of target instances, acquiring and releasing a target object from the pool for each method invocation.

This class is independent of pooling technology.

Subclasses must implement the and methods to work with their chosen pool. The method inherited from the base class can be used to create objects to put in the pool. Subclasses must also implement some of the monitoring methods from the interface. This class provides the method to return an making these statistics available on proxied objects.

This class implements the interface in order to force subclasses to implement the method to cleanup and close down their pool.

Rod Johnson Federico Spinazzi (.NET)
Base class for dynamic implementations that can create new prototype object instances to support a pooling or new-instance-per-invocation strategy.

All such s must run in an , as they need to call the method to create a new prototype instance.

Rod Johnson Federico Spinazzi (.NET)
Creates a new instance of the class.

This is an class, and as such exposes no public constructors.

Subclasses should use this method to create a new prototype instance. Returns the target object. The target object. If unable to obtain the target object. Releases the target object. The target object to release. Invoked by an after it has set all object properties supplied (and satisfied the and interfaces).

Ensures that the property has been set to a valid value (i.e. is not or a string that consists solely of whitespace).

In the event of misconfiguration (such as failure to set an essential property) or if initialization fails.
The shared instance for this class (and derived classes). The name of the target object to be created on each invocation.

This object should be a prototype, or the same instance will always be obtained from the owning .

The of the target object. Is the target source static? if the target source is static. The target factory that will be used to perform the lookup of the object referred to by the property.

Needed so that prototype instances can be created as necessary.

The owning (will never be ). In case of initialization errors.
Configuration interface for a pooling invoker. Rod Johnson Aleksandar Seovic (.NET) The number of active object instances in a pool. The number of free object instances in a pool. The maximum number of object instances in a pool. Creates a new instance of the class.

This is an class, and as such exposes no public constructors.

Returns the target object (acquired from the pool). The target object (acquired from the pool). If unable to obtain the target object. Gets the mixin. An exposing statistics about the pool maintained by this object. Create the pool. The owning , in case one needs collaborators from it (normally one's own properties are sufficient). In the case of errors encountered during the creation of the pool. Releases the target object (returns it to the pool). The target object to release (return to the pool). In the case that the could not be released. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Disposes of the pool.

The maximum number of object instances in this pool. The number of active object instances in this pool. The number of free object instances in this pool. The target factory that will be used to perform the lookup of the object referred to by the property. The owning (will never be ). In case of initialization errors. The to be used when there is no target object, and behavior is supplied by the advisors.

This class is exposed as a singleton.

Rod Johnson Aleksandar Seovic (.NET)
The to be used when there is no target object, and behavior is supplied by the advisors. Creates a new instance of the class.

This is a utility class, and as such has no publicly visible constructors.

Returns the target object. The target object. If unable to obtain the target object. Releases the target object. This is a no-op operation in this implementation. The target object to release. A that represents the current . A that represents the current . Populates a with the data needed to serialize the target object. The to populate with data. The destination (see ) for this serialization. The of the target object. Is the target source static?

The instance is static, and this always returns .

if the target source is static.
implementation that caches a local target object, but allows the target to be swapped while the application is running

If configuring an object of this class in a Spring IoC container, use constructor injection to supply the intial target.

Rod Johnson Aleksandar Seovic (.Net)
Creates a new instance of the with the initial target. The initial target. May be . Returns the target object. The target object. If unable to obtain the target object. Releases the target object.

No-op implementation.

The target object to release.
Swap the target, returning the old target. The new target. The old target. If the new target is . Determines whether the specified is equal to the current .

Two invoker interceptors are equal if they have the same target or if the targets are equal.

The target source to compare with. if this instance is equal to the specified .
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. A hash code for the current . The of the target object.

Can return .

Is the target source static? if the target source is static. Statistics for a thread local . Rod Johnson Federico Spinazzi (.NET) Gets the number of invocations of the and methods. The number of invocations of the and methods. Gets the number of hits that were satisfied by a thread bound object. The number of hits that were satisfied by a thread bound object. Gets the number of thread bound objects created. The number of thread bound objects created. implementation that creates a new instance of the target object for each request.

Can only be used in an object factory.

Rod Johnson Spinazzi Federico (.NET)
Returns the target object. The target object. If unable to obtain the target object. Releases the target object.

No-op implementation.

The target object to release.
Is the target source static? because this target source is never static. Pooling target source implementation based on the Rod Johnson Federico Spinazzi Returns the target object (acquired from the pool). The target object (acquired from the pool). If unable to obtain the target object. Creates the pool. The owning , in case one needs collaborators from it (normally one's own properties are sufficient). Creates a new instance of an appropriate implementation.

Subclasses can, of course, override this method if they want to return a different implementation.

An empty .
Releases the target object (returns it to the pool). The target object to release (return to the pool). In the case that the could not be released. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Disposes of the pool.

Creates an instance that can be returned by the pool. An instance that can be returned by the pool. Destroys an instance no longer needed by the pool. The instance to be destroyed. Ensures that the instance is safe to be returned by the pool. Returns false if this object should be destroyed. The instance to validate. if this object is not valid and should be dropped from the pool, otherwise . Reinitialize an instance to be returned by the pool. The instance to be activated. Passivates the object. The instance returned to the pool. The number of active object instances in this pool. The number of free object instances in this pool. implementation that holds a local object.

This is the default implementation of the interface used by the AOP framework. There should be no need to create objects of this class in application code.

Rod Johnson Aleksandar Seovic (.NET)
Creates a new instance of the for the specified target object. The target object to expose. If the supplied is . Creates a new instance of the for the specified target object. The target object to expose. The type of to expose. If the supplied is . Returns the target object. The target object. If unable to obtain the target object. Releases the target object.

No-op implementation.

The target object to release.
Returns a stringified representation of this target source. A stringified representation of this target source. Determines whether the specified is equal to the current . The target source to compare with. if this instance is equal to the specified . Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. A hash code for the current . The of the target object. Is the target source static? because this target source is always static. implementation that uses a threading model in which every thread has its own copy of the target.

Alternative to an object pool.

Application code is written as to a normal pool; callers can't assume they will be dealing with the same instance in invocations in different threads. However, state can be relied on during the operations of a single thread: for example, if one caller makes repeated calls on the AOP proxy.

This class act both as an introduction and as an interceptor, so it should be added twice, once as an introduction and once as an interceptor.

Rod Johnson Federico Spinazzi (.NET)
ThreadLocal holding the target associated with the current thread.

Unlike most thread local storage which is static, this variable is meant to be per thread per instance of this class.

The set of managed targets, enabling us to keep track of the targets we've created. Returns the target object.

Tries to locate the target from thread local storage. If no target is found, a target will be obtained and bound to the thread.

The target object. If unable to obtain the target object.
Return an introduction advisor mixin that allows the AOP proxy to be cast to an reference. Cleans up this instance's thread storage, and disposes of any targets as necessary. Increments Invocations and Hits statistics The method invocation joinpoint The result of the call to IJoinpoint.Proceed(), might be intercepted by the interceptor. if the interceptors or the target-object throws an exception. Gets the number of invocations of the and methods. The number of invocations of the and methods. Gets the number of hits that were satisfied by a thread bound object. The number of hits that were satisfied by a thread bound object. Gets the number of thread bound objects created. The number of thread bound objects created. AOP Aspect abstraction, holding a list of s Aleksandar Seovic (.NET) Gets or sets a list of advisors. A list of advisors. Advice that executes after a method returns successfully.

After returning advice is invoked only on a normal method return, but not if an exception is thrown. Such advice can see the return value of the advised method invocation, but cannot change it.

Possible uses for this type of advice would include performing access control checks on the return value of an advised method invocation, the ubiquitous logging of method invocation return values (useful during development), etc.

Rod Johnson Aleksandar Seovic (.NET)
Executes after returns successfully.

Note that the supplied cannot be changed by this type of advice... use the around advice type () if you need to change the return value of an advised method invocation. The data encapsulated by the supplied can of course be modified though.

The value returned by the . The intecepted method. The intercepted method's arguments. The target object.
Superinterface for all before advice.

Before advice is advice that executes before a joinpoint, but which does not have the ability to prevent execution flow proceeding to the joinpoint (unless it throws an ).

Spring.NET only supports method before advice. Although this is unlikely to change, this API is designed to allow field before advice in future if desired.

Rod Johnson Aleksandar Seovic (.NET)
Subinterface of the AOP Alliance interface that allows additional interfaces to be implemented by the interceptor, and available via a proxy using that interceptor.

This is a fundamental AOP concept called introduction.

Introductions are often mixins, enabling the building of composite objects that can achieve many of the goals of multiple inheritance.

Rod Johnson Aleksandar Seovic (.NET)
Does this implement the given interface? The interface to check. if this implements the given interface. Advice executed before a method is invoked.

Such advice cannot prevent the method call proceeding, short of throwing an .

The main advantage of before advice is that there is no possibility of inadvertently failing to proceed down the interceptor chain, since there is no need (and indeed means) to invoke the next interceptor in the call chain.

Possible uses for this type of advice would include performing class invariant checks prior to the actual method invocation, the ubiquitous logging of method invocations (useful during development), etc.

Rod Johnson Aleksandar Seovic (.NET)
The callback before a given method is invoked. The method being invoked. The arguments to the method. The target of the method invocation. May be . Thrown when and if this object wishes to abort the call. Any exception so thrown will be propagated to the caller. Simple marker interface for throws advice.

There are no methods on this interface, as methods are discovered and invoked via reflection. Please do see read the API documentation for the class; said documention describes in detail the signature of the methods that implementations of the interface must adhere to in the specific case of Spring.NET's implementation of throws advice.

There are any number of possible uses for this type of advice. Some examples would include the ubiquitous logging of any such exceptions, monitoring the number and type of exceptions and sending emails to a support desk once certain criteria have been met, wrapping generic exceptions such as in exceptions that are more meaningful to your business logic, etc.

Rod Johnson Aleksandar Seovic (.NET)
Canonical that matches all methods. Rod Johnson Aleksandar Seovic (.NET) Canonical instance that matches all methods.

It is not dynamic.

Creates a new instance of the class.

This is a utility class, and as such has no publicly visible constructors.

Does the supplied satisfy this matcher? Perform static checking. If this returns false, or if the isRuntime() method returns false, no runtime check will be made. The candidate method. The target class (may be , in which case the candidate class must be taken to be the 's declaring class). if this this method matches statically. Is there a runtime (dynamic) match for the supplied ? The candidate method. The target class. The arguments to the method if there is a runtime match. A that represents the current . A that represents the current . Populates a with the data needed to serialize the target object. The to populate with data. The destination (see ) for this serialization. Is this dynamic? if this is dynamic. Canonical instance that matches everything. Rod Johnson Aleksandar Seovic (.NET) Canonical instance that matches everything. Creates a new instance of the class.

This is a utility class, and as such has no publicly visible constructors.

A that represents the current . A that represents the current . Populates a with the data needed to serialize the target object. The to populate with data. The destination (see ) for this serialization. The for this pointcut. The current . The for this pointcut. The current . Canonical instances.

Only one canonical instance is provided out of the box. The matches all classes.

Rod Johnson Aleksandar Seovic (.NET)
Canonical instance that matches all classes. Creates a new instance of the class.

This is a utility class, and as such has no publicly visible constructors.

Should the pointcut apply to the supplied ? The candidate . if the advice should apply to the supplied A that represents the current . A that represents the current . Populates a with the data needed to serialize the target object. The to populate with data. The destination (see ) for this serialization. Superclass for all AOP infrastructure exceptions. Aleksandar Seovic Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Intercepts the construction of a new object.

Such interceptions are nested "on top" of the target.

Implement this method to perform extra treatments before and after the consruction of a new object.

Polite implementations would certainly like to invoke .

The constructor invocation that is being intercepted. The newly created object, which is also the result of the call to , and might be replaced by the interceptor. If any of the interceptors in the chain or the target object itself throws an exception.
A description of an invocation to a constuctor, given to an interceptor upon constructor-call.

A constructor invocation is a joinpoint and can be intercepted by a constructor interceptor.

Gets the constructor invocation that is to be invoked.

This property is a friendly implementation of the property. It should be used in preference to the property because it provides immediate access to the underlying constructor without the need to resort to a cast.

The constructor invocation that is to be invoked.
Base class for different cache advice implementations that provide access to common functionality, such as obtaining a cache instance. Aleksandar Seovic Returns an instance based on the cache name. The name of the cache. Cache instance for the specified if one is registered in the application context, or null if it isn't. Prepares variables for expression evaluation by packaging all method arguments into a dictionary, keyed by argument name. Method to get parameters info from. Argument values to package. A dictionary containing all method arguments, keyed by method name. Evaluates a SpEL expression as a boolean value. The expression string that should be evaluated. The SpEL expression instance that should be evaluated. The object to evaluate expression against. The expression variables dictionary. The evaluated boolean. If the SpEL expression could not be successfuly resolved to a boolean. Retrieves custom attribute for the specified attribute type. Method to get attribute from. Attribute type. Attribute instance if one is found, null otherwise. Sets the that this object runs in. Caching aspect implementation. This class encapsulates all the advisors that need to be configured to support Spring's full caching functionality. Aleksandar Seovic Creates a new instance. Gets or sets a list of advisors for this aspect. A list of advisors for this aspect. Sets the that this object runs in.

Normally this call will be used to initialize the object.

Invoked after population of normal object properties but before an init callback such as 's or a custom init-method. Invoked after the setting of any 's property.

In the case of application context initialization errors. If thrown by any application context methods.
Implementation of a parameter caching advice.

This advice can be used to cache the parameter of the method.

Information that determines where, how and for how long the return value will be cached are retrieved from the s that are defined on the pointcut.

Parameter values are cached *after* the target method is invoked in order to capture any parameter state changes it might make (for example, it is common to set an object identifier within the save method for the persistent entity).

Aleksandar Seovic
Executes after target returns successfully.

Note that the supplied cannot be changed by this type of advice... use the around advice type () if you need to change the return value of an advised method invocation. The data encapsulated by the supplied can of course be modified though.

The value returned by the . The intecepted method. The intercepted method's arguments. The target object.
Convinience advisor implementation that applies to all the methods that have defined on one or more of their parameters. Aleksandar Seovic Creates new advisor instance. Returns true if any of the parameters of the specified has applied. Method to check. Type of target object. true if any of the parameters of the specified has applied; false otherwise. Sets the that this object runs in.

Normally this call will be used to initialize the object.

Invoked after population of normal object properties but before an init callback such as 's or a custom init-method. Invoked after the setting of any 's property.

In the case of application context initialization errors. If thrown by any application context methods.
Implementation of a result caching advice.

This advice can be used to cache the return value of the method.

Parameters that determine where, how and for how long the return value will be cached are retrieved from the and/or that are defined on the pointcut.

Aleksandar Seovic
Applies caching around a method invocation.

This method tries to retrieve an object from the cache, using the supplied to generate a cache key. If an object is found in the cache, the cached value is returned and the method call does not proceed any further down the invocation chain.

If object does not exist in the cache, the advised method is called (using ) and any return value is cached for the next method invocation.

The method invocation that is being intercepted. A cached object or the result of the call. If any of the interceptors in the chain or the target object itself throws an exception.
Obtains return value either from cache or by invoking target method and caches it if necessary. The method invocation that is being intercepted. Attribute specifying where and how to cache return value. Can be null, in which case no caching of the result as a whole will be performed (if the result is collection, individual items could still be cached separately). Returns true if the return value was found in cache, false otherwise. Return value for the specified . Caches each item from the collection returned by target method. A collection of items to cache. Attributes specifying where and how to cache each item from the collection. Convinience advisor implementation that applies to all the methods that have defined. Aleksandar Seovic Creates new advisor instance. Returns true if either or is applied to the . Method to check. Type of target object. true if either or is applied to the ; false otherwise. Sets the that this object runs in.

Normally this call will be used to initialize the object.

Invoked after population of normal object properties but before an init callback such as 's or a custom init-method. Invoked after the setting of any 's property.

In the case of application context initialization errors. If thrown by any application context methods.
Implementation of a cache invalidation advice.

This advice can be used to evict items from the cache.

Information that determines which items should be evicted and from which cache are retrieved from the s that are defined on the pointcut.

Items are evicted *after* target method is invoked. Return value of the method, as well as method arguments, can be used to determine a list of keys for the items that should be evicted (return value will be passed as a context for expression evaluation, and method arguments will be passed as variables, keyed by argument name).

Aleksandar Seovic
Executes after returns successfully.

Note that the supplied cannot be changed by this type of advice... use the around advice type () if you need to change the return value of an advised method invocation. The data encapsulated by the supplied can of course be modified though.

The value returned by the . The intecepted method. The intercepted method's arguments. The target object.
Convinience advisor implementation that applies to all the methods that have defined. Aleksandar Seovic Creates new advisor instance. Sets the that this object runs in.

Normally this call will be used to initialize the object.

Invoked after population of normal object properties but before an init callback such as 's or a custom init-method. Invoked after the setting of any 's property.

In the case of application context initialization errors. If thrown by any application context methods.
Exception advice to perform exception translation, conversion of exceptions to default return values, and exception swallowing. Configuration is via a DSL like string for ease of use in common cases as well as allowing for custom translation logic by leveraging the Spring expression language. The exception handler collection can be filled with either instances of objects that implement the interface or a string that follows a simple syntax for most common exception management needs. The source exceptions to perform processing on are listed immediately after the keyword 'on' and can be comma delmited. Following that is the action to perform, either log, translate, wrap, replace, return, or swallow. Following the action is a Spring expression language (SpEL) fragment that is used to either create the translated/wrapped/replaced exception or specify an alternative return value. The variables available to be used in the expression language fragment are, #method, #args, #target, and #e which are 1) the method that threw the exception, the arguments to the method, the target object itself, and the exception that was thrown. Using SpEL gives you great flexibility in creating a translation of an exception that has access to the calling context. Common translation cases, wrap and rethrow, are supported with a shorter syntax where you can specify only the exception text for the new translated exception. If you ommit the exception text a default value will be used. The exceptionsHandlers are compared to the thrown exception in the order they are listed. logging an exception will continue the evaluation process, in all other cases exceution stops at that point and the appropriate exceptions handler is executed. on FooException1 log 'My Message, Method Name ' + #method.Name on FooException1 translate new BarException('My Message, Method Called = ' + #method.Name", #e) on FooException2,Foo3Exception wrap BarException 'My Bar Message' on FooException4 replace BarException 'My Bar Message' on FooException5 return 32 on FooException6 swallow Mark Pollack This is Mark Pollack Implement this method to perform extra treatments before and after the call to the supplied .

Polite implementations would certainly like to invoke .

The method invocation that is being intercepted. The result of the call to the method of the supplied ; this return value may well have been intercepted by the interceptor. If any of the interceptors in the chain or the target object itself throws an exception.
Invoked by an after it has injected all of an object's dependencies.

This method allows the object instance to perform the kind of initialization only possible when all of it's dependencies have been injected (set), and to throw an appropriate exception in the event of misconfiguration.

Please do consult the class level documentation for the interface for a description of exactly when this method is invoked. In particular, it is worth noting that the and callbacks will have been invoked prior to this method being called.

In the event of misconfiguration (such as the failure to set a required property) or if initialization fails.
Parses the advice expression. The advice expression. An instance of ParsedAdviceExpression Gets the match using exception constraint expression. The advice expression string. The regex string. The Match object resulting from the regular expression match. Override in case you need to initialized non-serialized fields on deserialization. Gets or sets the Regex string used to parse advice expressions starting with 'on exception name' and subclass specific actions. The regex string to parse advice expressions starting with 'on exception name' and subclass specific actions. Gets or sets the Regex string used to parse advice expressions starting with 'on exception (constraint)' and subclass specific actions. The regex string to parse advice expressions starting with 'on exception (constraint)' and subclass specific actions. Log instance available to subclasses Holds shared handler definition templates Implement this method to perform extra treatments before and after the call to the supplied .

Polite implementations would certainly like to invoke .

The method invocation that is being intercepted. The result of the call to the method of the supplied ; this return value may well have been intercepted by the interceptor. If any of the interceptors in the chain or the target object itself throws an exception.
Invoked by an after it has injected all of an object's dependencies.

This method allows the object instance to perform the kind of initialization only possible when all of it's dependencies have been injected (set), and to throw an appropriate exception in the event of misconfiguration.

Please do consult the class level documentation for the interface for a description of exactly when this method is invoked. In particular, it is worth noting that the and callbacks will have been invoked prior to this method being called.

In the event of misconfiguration (such as the failure to set a required property) or if initialization fails.
Invokes handlers registered for the passed exception and The exception to be handled The that raised this exception. The output of Parses the specified handler string, creating an instance of IExceptionHander. The handler string. an instance of an exception handler or null if was not able to correctly parse handler string. Creates the exception handler. The parsed advice expression. The exception handler instance Creates the execute spel exception handler. The parsed advice expression. Creates the return value exception handler. The parsed advice expression. Creates the swallow exception hander. The parsed advice expression. Creates the translation exception handler. The exception names. Creates the log exception handler. The exception names. Log exception Parses the wrapped exception expression. The action. The handler string. Gets or sets the Regex string used to parse advice expressions starting with 'on exception name' and exception handling actions. The regex string to parse advice expressions starting with 'on exception name' and exception handling actions. Gets or sets the Regex string used to parse advice expressions starting with 'on exception (constraint)' and exception handling actions. The regex string to parse advice expressions starting with 'on exception (constraint)' and exception handling actions. Gets or sets the exception handler. The exception handler. Gets the exception handler dictionary. Allows for registration of a specific handler where the key is the action type. This makes configuration of a custom exception handler easier, for example LogExceptionHandler, in that only 'user friendly' properties such as LogName, etc., need to be configured and not 'user unfriendly' properties such as ConstraintExpressionText and ActionExpressionText. The exception handler dictionary. A specialized dictionary for key value pairs of (string, IExceptionHandler) Adds the specified key. The key. The value. Adds an element with the specified key and value into the . The key of the element to add. The value of the element to add. The value can be null. is null. An element with the same key already exists in the . or key is not a string or value is not an IExceptionHandler. The is read-only.-or- The has a fixed size. Gets the with the specified key. Gets the with the specified key. Executes an abribtrary Spring Expression Language (SpEL) expression as an action when handling an exception. An abstract base class providing all necessary functionality for typical IExceptionHandler implementations. Mark Pollack Handles a thrown exception providing calling context. Mark Pollack Determines whether this instance can handle the exception the specified exception. The exception. The call context dictionary. true if this instance can handle the specified exception; otherwise, false. Handles the exception. The call context dictionary. The return value from handling the exception, if not rethrown or a new exception is thrown. Gets the source exception names. The source exception names. Gets the source exception types. The source exception types. Gets the translation expression text The translation expression text Gets or sets the constraint expression text. The constraint expression text. Gets a value indicating whether to continue processing. true if continue processing; otherwise, false. The logging instance Initializes a new instance of the class. Initializes a new instance of the class. The exception names. Determines whether this instance can handle the exception the specified exception. The exception. The call context dictionary. true if this instance can handle the specified exception; otherwise, false. Handles the exception. The return value from handling the exception, if not rethrown or a new exception is thrown. Gets the source exception names. The source exception names. Gets the source exception types. The source exception types. Gets the action translation expression text The action translation expression. Gets or sets the constraint expression text. The constraint expression text. Gets a value indicating whether to continue processing. true if continue processing; otherwise, false. Initializes a new instance of the class. Initializes a new instance of the class. The exception names. Handles the exception. The return value from handling the exception, if not rethrown or a new exception is thrown. Log the exceptions. Default log nameis "LogExceptionHandler" and log level is Debug Mark Pollack Initializes a new instance of the class. Initializes a new instance of the class. The exception names. Handles the exception. the calling context dictionary The return value from handling the exception, if not rethrown or a new exception is thrown. Gets or sets the name of the log. The name of the log. Gets or sets the log level. The log level. Gets or sets a value indicating whether to log message only, and not pass in the exception to the logging API true if log message only; otherwise, false. Gets the action translation expression text. Overridden to add approprate settings to the SpEL expression that does the logging so that it depends on the values of LogLevel and LogMessageOnly. Those properties must be set to the desired values before calling this method. The action translation expression. Evaluates the expression for the return value of the method. Mark Pollack Initializes a new instance of the class. Initializes a new instance of the class. The exception names. Returns the result of evaluating the translation expression. The return value from handling the exception, if not rethrown or a new exception is thrown. Returns a token to indicate that this exception should be swallowed. Mark Pollack Initializes a new instance of the class. Initializes a new instance of the class. The exception names. Handles the exception. The return value from handling the exception, if not rethrown or a new exception is thrown. Translates from one exception to another based. My wrap or replace exception depending on the expression. Mark Pollack Initializes a new instance of the class. Initializes a new instance of the class. The exception names. Handles the exception. The return value from handling the exception, if not rethrown or a new exception is thrown. Abstract base class for logging advice Mark Pollack The default ILog instance used to write logging messages. The name of the logger instance to use for obtaining from . Indicates whether or not proxy type names should be hidden when using dynamic loggers. Creates a new advice instance using this advice type's name for logging by default. Adds logging to the method invocation. The method IsInterceptorEnabled is called as an optimization to determine if logging should be applied. If logging should be applied, the method invocation is passed to the InvokeUnderLog method for handling. If not, the method proceeds as normal. The method invocation that is being intercepted. The result of the call to the method of the supplied ; this return value may well have been intercepted by the interceptor. If any of the interceptors in the chain or the target object itself throws an exception. Determines whether the interceptor is enabled for the specified invocation, that is, whether the method InvokeUnderLog is called. The default behavior is to check whether the given ILog instance is enabled by calling IsLogEnabled, whose default behavior is to check if the TRACE level of logging is enabled. Subclasses The invocation. The log to write messages to true if [is interceptor enabled] [the specified invocation]; otherwise, false. Determines whether the given log is enabled. Default is true when the trace level is enabled. Subclasses may override this to change the level at which logging occurs, or return true to ignore level checks. The log instance to check. true if log is for a given log level; otherwise, false. Subclasses must override this method to perform any tracing around the supplied IMethodInvocation. Subclasses are resonsible for ensuring that the IMethodInvocation actually executes by calling IMethodInvocation.Proceed(). By default, the passed-in ILog instance will have log level "trace" enabled. Subclasses do not have to check for this again, unless they overwrite the IsInterceptorEnabled method to modify the default behavior. The method invocation to log The log to write messages to The result of the call to IMethodInvocation.Proceed() If any of the interceptors in the chain or the target object itself throws an exception. Gets the appropriate log instance to use for the given IMethodInvocation. If the UseDynamicLogger property is set to true, the ILog instance will be for the target class of the IMethodInvocation, otherwise the log will be the default static logger. The method invocation being logged. The ILog instance to use. Sets the default logger to the given name. if null, the default logger is removed. Override in case you need to initialized non-serialized fields on deserialization. Sets a value indicating whether to use a dynamic logger or static logger Default is to use a static logger. Used to determine which ILog instance should be used to write log messages for a particular method invocation: a dynamic one for the Type getting called, or a static one for the Type of the trace interceptor. Specify either this property or LoggerName, not both. true if use dynamic logger; otherwise, false. Sets the name of the logger to use. The name will be passed to the underlying logging implementation through Common.Logging, getting interpreted as the log category according to the loggers configuration. This can be specified to not log into the category of a Type (whether this interceptor's class or the class getting called) but rather to a specific named category. Specify either this property or UseDynamicLogger, but not both. The name of the logger. Sets a value indicating whether hide proxy type names (whenever possible) when using dynamic loggers, i.e. property UseDynamicLogger is set to true. true if [hide proxy type names]; otherwise, false. Configurable advice for logging. Mark Pollack Flag to indicate if unique identifier should be in the log message. Flag to indicate if the execution time should be in the log message. Flag to indicate if the method arguments should be in the log message. Flag to indicate if the return value should be in the log message. The separator string to use for delmiting log message fields. The log level to use for logging the entry, exit, exception messages. Initializes a new instance of the class. Initializes a new instance of the class. if set to true to use dynamic logger, if false use static logger. Subclasses must override this method to perform any tracing around the supplied IMethodInvocation. The method invocation to log The log to write messages to The result of the call to IMethodInvocation.Proceed() Subclasses are resonsible for ensuring that the IMethodInvocation actually executes by calling IMethodInvocation.Proceed(). By default, the passed-in ILog instance will have log level "trace" enabled. Subclasses do not have to check for this again, unless they overwrite the IsInterceptorEnabled method to modify the default behavior. If any of the interceptors in the chain or the target object itself throws an exception. Determines whether the given log is enabled. The log instance to check. true if log is for a given log level; otherwise, false. Default is true when the trace level is enabled. Subclasses may override this to change the level at which logging occurs, or return true to ignore level checks. Creates a unique identifier. Default implementation uses Guid.NewGuid(). Subclasses may override to provide an alternative ID generation implementation. A unique identifier Gets the entry message to log The invocation. The id string. The entry log message Gets the exception message. The method invocation. The thown exception. The execution time span. The id string. The exception log message. Gets the exit log message. The method invocation. The return value. The execution time span. The id string. the exit log message Appends common information across entry,exit, exception logging Add method name and unique identifier if required. The string buffer building logging message. The method invocation. The unique identifier string. Gets the method argument as argumen name/value pairs. The method invocation. string for logging method argument name and values. Gets or sets a value indicating whether to log a unique identifier with the log message. true if [log unique identifier]; otherwise, false. Gets or sets a value indicating whether to log execution time. true if log execution time; otherwise, false. Gets or sets a value indicating whether log method arguments. true if log method arguments]; otherwise, false. Gets or sets a value indicating whether log return value. true if log return value; otherwise, false. Gets or sets the seperator string to use for delmiting log message fields. The seperator. Gets or sets the entry log level. The entry log level. This advice is typically applied to service-layer methods in order to validate method arguments. Each argument that should be validated has to be marked with one or more s. If the validation fails, this advice will throw , thus preventing target method invocation. Damjan Tomic Aleksandar Seovic Intercepts method invocation and validates arguments. Method invocation. Method arguments. Target object. If one or more method arguments fail validation. Sets the application context to search for validators in. The application context to search for validators in. Convinience advisor implementation that applies to all the methods that have defined on one or more of their parameters. Bruno Baia Creates new advisor instance. Returns true if any of the parameters of the specified has applied. Method to check. Type of target object. true if any of the parameters of the specified has applied; false otherwise. Sets the that this object runs in.

Normally this call will be used to initialize the object.

Invoked after population of normal object properties but before an init callback such as 's or a custom init-method. Invoked after the setting of any 's property.

In the case of application context initialization errors. If thrown by any application context methods.
This class contains the results of parsing an advice expresion of the form on exception name [ExceptionName1,ExceptionName2,...] [action] [action expression] or on exception [constraint expression] [action] [action expression] Mark Pollack Initializes a new instance of the class. The advice expression. Gets or sets the advice expression. The advice expression. Gets or sets the exception names. The exception names. Gets or sets the constraint expression. The constraint expression. Gets or sets the action expression text. The action expression text. Gets or sets the action text. The action text. Gets or sets a value indicating whether this is success. true if success; otherwise, false. AOP Advice to retry a method invocation on an exception. The retry semantics are defined by a DSL of the form on exception name [ExceptionName1,ExceptionName2,...] retry [number of times] [delay|rate] [delay time|rate expression]. For example, on exception name ArithmeticException retry 3x delay 1s Mark Pollack Implement this method to perform extra treatments before and after the call to the supplied . The method invocation that is being intercepted. The result of the call to the method of the supplied ; this return value may well have been intercepted by the interceptor.

Polite implementations would certainly like to invoke .

If any of the interceptors in the chain or the target object itself throws an exception.
Invoked by an after it has injected all of an object's dependencies.

This method allows the object instance to perform the kind of initialization only possible when all of it's dependencies have been injected (set), and to throw an appropriate exception in the event of misconfiguration.

Please do consult the class level documentation for the interface for a description of exactly when this method is invoked. In particular, it is worth noting that the and callbacks will have been invoked prior to this method being called.

In the event of misconfiguration (such as the failure to set a required property) or if initialization fails.
Parses the specified handler string. The handler string. Gets the match for action expression. The action expression string. The regex string. The Match object resulting from the regular expression match. Override in case you need to initialized non-serialized fields on deserialization. Gets or sets the retry expression. The retry expression. Gets or sets the Regex string used to parse advice expressions starting with 'on exception name' and exception handling actions. The regex string to parse advice expressions starting with 'on exception name' and exception handling actions. Gets or sets the Regex string used to parse advice expressions starting with 'on exception (constraint)' and exception handling actions. The regex string to parse advice expressions starting with 'on exception (constraint)' and exception handling actions. Sleeps for the appropriate amount of time for an exception. Mark Pollack Initializes a new instance of the class. Initializes a new instance of the class. The exception names. Handles the exception. The return value from handling the exception, if not rethrown or a new exception is thrown. Gets the maximum retry count. The maximum retry count. Gets a value indicating whether this instance is delay based. true if this instance is delay based; otherwise, false. Gets or sets the delay time span to sleep after an exception is thrown and a rety is attempted. The delay time span. Gets or sets the delay rate expression. The delay rate expression.